Using the 'exclusion' character [^x] for a full word
Posted: Tue Oct 10, 2006 9:44 pm
Hi,
Is there a way to use the "all characters except for" character in a Regex, but rather than exclude individual characters, exclude full words.
For example, [^269] will pick up all characters except for the number 2, 6, and 9.
But what if I wanted to exclude a word? For example [^"hello"], which will detect *anything* other than the word "hello".
Can it be done?
Thanks.
Callum.
Is there a way to use the "all characters except for" character in a Regex, but rather than exclude individual characters, exclude full words.
For example, [^269] will pick up all characters except for the number 2, 6, and 9.
But what if I wanted to exclude a word? For example [^"hello"], which will detect *anything* other than the word "hello".
Can it be done?
Thanks.
Callum.