How to exclude a string form a search result

A place to try and solve your RegEx problems.
Post Reply
sami
Posts: 2
Joined: Wed Dec 02, 2020 1:28 pm

How to exclude a string form a search result

Post by sami »

Hi,
I would like to use TextCrawler to search for a string but ignore/exclude an other string from the result.

Example:
Look for "admin"
But not for "administrator" and "administration"

Thanks in advance for your help !
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: How to exclude a string form a search result

Post by DigitalVolcano »

You'd need to use a slightly more complex regular expression, which negative lookahead-
See-
https://stackoverflow.com/questions/207 ... ord-string
Post Reply