I have problem with regex. I need to make regex with an exception of a set of specified words, for example: apple, orange, juice. and given these words, it will match everyt
Something like (PHP)
$input = "The orange apple gave juice"; if(preg_match("your regex for validating") && !preg_match("/apple|orange|juice/", $input)) { // it's ok; } else { //throw validation error }