Find all files that contain anyone of a group of words.

Find, replace, find in files, replace in files, regular expressions

Find all files that contain anyone of a group of words.

Postby alnorr01 » Tue Aug 08, 2006 5:10 pm

I am using Search>Find in files.
I am trying to find all files that contain any of my specified text strings.
Example: (Text1 or Text 2 or Text 3 or Text4)
I tried using a regular expression but could only get it to work for 2 text strings at a time.
Example using UltraEdit Syntax): ^{Text1^}^{Text2^}
Example using Unix Syntax): (Text1|Text2)
I need help building an expression that will let me find files that contain any of a list of text strings.
User avatar
alnorr01
Newbie
 
Posts: 2
Joined: Mon Aug 07, 2006 11:00 pm

Re: Find all files that contain anyone of a group of words.

Postby Bego » Wed Aug 09, 2006 5:54 am

Hi,

- switch to the new "perl regexp style" in options dialog.
- then search for (I|am|looking|for|those|words)and you'll see that it works.
UE style (and Unix style) only support 2 OR arguments.

rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: Find all files that contain anyone of a group of words.

Postby alnorr01 » Wed Aug 09, 2006 6:36 pm

Thanks a lot, Bego
It's works great.
User avatar
alnorr01
Newbie
 
Posts: 2
Joined: Mon Aug 07, 2006 11:00 pm


Return to Find/Replace/Regular Expressions