<?php
$Data = "
HTTP/1.1 200 OK
Date: Mon, 17 Jun 2019 19:32:37 GMT
Server: Apache/2.4.38 (Win32) OpenSSL/1.1.1a PHP/7.2.15
X-Powered-By: PHP/7.2.15
Set-Cookie: Avisistema=ihk9t1ms6r8i0u1j5t6jpjrqei; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: Avisistema=ihk9t1ms6r8i0u1j5t6jpjrqei; expires=Tue, 18-Jun-2019 03:32:37 GMT; Max-Age=28799; path=/; HttpOnly
Set-Cookie: SageFirmeware=Avisistema.A.0.2015.01.10; expires=Tue, 18-Jun-2019 03:32:37 GMT; Max-Age=28799; path=/; HttpOnly
Content-Length: 232
Content-Type: application/json
Some-Garbage: test string";
echo preg_match('~^Content-Type: \K.+~m', $Data, $match) ? $match[0] : 'fail';
- Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
- application/json
preferences:
155.13 ms | 410 KiB | 5 Q