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 WEBKg
Output for 4.3.0 - 7.1.0
array(1) { [0]=> array(1) { [0]=> string(20) "uni-direct@uws.ac.uk" } }