3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $exception ='word1|word3|word3|word4' ; $regex = "(?!('.$exception.')((\W+)|$))[a-zA-Z\-_]+/?$"; $myword = 'a-unicode-statement-like-سلام' ; $m = preg_match($regex, $myword); print $m;
Output for 4.3.11 - 7.2.0
Warning: preg_match(): Unknown modifier '[' in /in/jDrUc on line 7
Output for 4.3.0 - 4.3.10
Warning: Unknown modifier '[' in /in/jDrUc on line 7