3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '"a.kononenko@nsk.bsspharm.ru" <a.kononenko@nsk.bsspharm.ru>'; $pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i'; preg_match_all($pattern, $string, $matches); var_dump($matches[0]); ?>
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.24, 8.2.0 - 8.2.11
array(2) { [0]=> string(20) "a.kononenko@nsk.bssp" [1]=> string(20) "a.kononenko@nsk.bssp" }

preferences:
24.65 ms | 405 KiB | 5 Q