3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $re = "/[\\w-+]+(?:\\.[\\w-+]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7}/i"; $str = "sad@wtasd.com,asdda@gmna.lt;asdasd@nano.lt"; preg_match_all($re, $str, $matches); var_dump($matches); ?>
based on EZKkd
Output for 4.3.0 - 7.2.0
array(1) { [0]=> array(3) { [0]=> string(13) "sad@wtasd.com" [1]=> string(13) "asdda@gmna.lt" [2]=> string(14) "asdasd@nano.lt" } }