regex AND operator?
regex AND operator?
I'm trying to search using TextCrawler for files that contain both phrases. For example, only if 'EMPLOYEE HEALTH,MMMC' is found, AND,' CHEST PA & LATERAL' is found. I tried using a pipe (|), but it appears that is more like an OR than an AND. Thanks for any help.
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: regex AND operator?
ANDs are tricky with regular expresssions.
You can use positive lookaheads:
It might be a little slow on larger files.
You can use positive lookaheads:
Code: Select all
(?=.*phrase)(?=.*anotherphrase)