RsD0p9BK
9/1/2016 - 11:02 AM

preg__except.php

// Regex - match anything except specific string
echo preg_replace('/(?!.*(red|green|blue).*)(.*(YOUR_REGEXP).*)/', 'dog', $string);

// http://stackoverflow.com/questions/16930563/regex-match-anything-except-specific-string