в $header если сделать вардамп выводится следующее
string(324) "HTTP/1.1 200 OK Date: Tue, 11 Dec 2018 10:27:40 GMT Server: Apache X-Powered-By: PHP/5.6.28-pl0-gentoo Content-Length: 51408 Cache-Control: public Content-Transfer-Encoding: Binary Content-Disposition: attachment; filename=2018.12.07_[14:28:30]_+74562697525_103.mp3 Accept-Ranges: bytes Content-Type: audio/mpeg "
HTTP заголовки разделяются переводами строк. Сделай
echo "<pre>", $header, "</pre>";
HTTP/1.1 200 OK
Date: Tue, 11 Dec 2018 10:27:40 GMT
Server: Apache
X-Powered-By: PHP/5.6.28-pl0-gentoo
Content-Length: 51408
Cache-Control: public
Content-Transfer-Encoding: Binary
Content-Disposition: attachment; filename=2018.12.07_[14:28:30]_+74562697525_103.mp3
Accept-Ranges: bytes
Content-Type: audio/mpeg
Без модификатора /s метасимвол точка совпадает со всеми символами, кроме переводов строк.
$header1=preg_replace('~^.+Content-Disposition: attachment; filename=(.+)Accept-Ranges.+$~is','$1',$header);