3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regex = '/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9][-a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,4}|museum|travel)/i'; $email = 'uni-direct@uws.ac.uk'; preg_match_all($regex, $email, $matches); var_dump($matches);
based on M5Z42
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(1) { [0]=> string(20) "uni-direct@uws.ac.uk" } }