Search for string which is not part of a longer string
top of page

Search for string which is not part of a longer string


Here's another way to search for a string which does not fall within a longer string:

\b[0-9]{7}-[0-9]{3}\b

Use the \b operators around your Regex search to make sure that it appear by itself and not within other alphanumeric characters.


bottom of page