3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^Diagnostic-Code:\K.*(?:\R(?!Diagnostic-Code:).*)*/'; $str = 'Diagnostic-Code: smtp; 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient\'s email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser 63si4621095ybi.465 - gsmtp Diagnostic-Code: smtp; 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient\'s email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser 63si4621095ybi.465 - gsmtp'; preg_match_all($re, $str, $matches); print_r($matches[0]);

preferences:
27.34 ms | 405 KiB | 5 Q