I am trying to write a regular expression that matches all occurrences of a specified word, but must not have any alphanumeric characters prefixed or suffixed.
For example, searching for the term “cat” should not return terms like “catalyst”.
Here is what I have so far:
"?<!([a-Z0-9])*?TERMPLACEHOLDER?!([a-Z0-9])*?"
This should return the word “TERMPLACEHOLDER” on its own.
Any ideas?
Thanks.
How about: