flea333
07-31-2012, 10:59 PM
Hi, I want to do something seemingly simple with reg expressions in the Word Find box: search for two words in a single line separated by any set of characters, except of course a new line character.
I've tried several syntax's that do not work.
So for example, I want to find any single line of text (isolated by carriage return/new line character) containing the two words "cat" and "mouse" I tried:
^l*"cat"*[~^l]"mouse"*^l
Problem is that returns the maximum amount of characters before seeing a new line. So I tried # etc but couldn't find it. Basically if I just figure out how to specify all characters except a new line I should be able to get my two words and that expression with the correct result.
eg: cat[expression of characters not inclusive of new line]mouse
This should return result:
The cat chased after the mouse.
But not:
The dog chased after the cat.
Then chased after the mouse.
I've tried several syntax's that do not work.
So for example, I want to find any single line of text (isolated by carriage return/new line character) containing the two words "cat" and "mouse" I tried:
^l*"cat"*[~^l]"mouse"*^l
Problem is that returns the maximum amount of characters before seeing a new line. So I tried # etc but couldn't find it. Basically if I just figure out how to specify all characters except a new line I should be able to get my two words and that expression with the correct result.
eg: cat[expression of characters not inclusive of new line]mouse
This should return result:
The cat chased after the mouse.
But not:
The dog chased after the cat.
Then chased after the mouse.