Vman
Vman

Reputation: 3136

Visual Studio 2008 'find in files' reg-ex

Really easy question for somebody, I know it’s really simple but I just can’t work out how to search for two matching strings using the regex ‘find in files’ search in Visual Studio 2008. So for, if I have lines:

One twoo three four five
On tw three four five
One two thre fourr five
One two three fur five

I want to search for ‘two’ and ‘four’ (so returning only the first and third lines). Thanks.

Upvotes: 1

Views: 101

Answers (1)

Ron Sijm
Ron Sijm

Reputation: 8758

How about just (?=.*two)(?=.*four)?

Upvotes: 2

Related Questions