need help creating a non matching regex pattern
i'm trying to create a regex pattern that returns true if a certain word is not found. Ive tried using [^word] but that doesn't match up against a word just the individu开发者_运维问答al characters as they appear.
I need preg_match(using php) to return true cause there are other words that I to match and return true.
if you are looking for a string within a string (no pattern needed) then use strstr() or stristr()
if (!preg_match("/word/", $string)) { // <-- true, if not match
// code here
}
精彩评论