You mean like a boolean OR or a boolean AND?
OR is simple:

(word1|word2)

AND is trickier since it depends on which word comes first:

word1.*?word2

The above will only work if word1 comes first.

To cross that hurdle you have to combine alternation and the wildcard:
(word1|word2).*?(word1|word2)

The above expression means "after you find either word1 or word2, keep
looking until you find either one again." The dot means any character, the
asterisk means any number of repetitions, and the question marks means "stop
when you find the first one" instead of "stop when you find the last one,"
which is the default behavior.

Whether the search is multiline or not depends on whether your app accepts
newline as a character.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Ok, my searching skills must be going to the doghouse...I'm trying to find
how to have a regular expression that will find two different words in the
same message under 40tude's Dialog (http://www.40tude.com/). Can regular
expressions do this?



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to