Hello,
In VS.NET, I assume the 'Find' tool lets you search using regular
expressions right?
How would I search for all lines in my project that contain 2 strings
(anywhere in the line, in any order)?
Example, the 2 strings could be: 1) script 2) text
Jesse Houwing - 05 Mar 2008 20:46 GMT
Hello DotNetNewbie,
> Hello,
>
[quoted text clipped - 5 lines]
>
> Example, the 2 strings could be: 1) script 2) text
Visual Studio uses a very nasty variation of Regex. Which is always very
frustrating for me to use. There are even 3rd party implementations of Find&Replace
which use the standard .NET flavour of regex instead.
The regex that works for me is:
{text.*script}|{script.*text}
--
Jesse Houwing
jesse.houwing at sogeti.nl
rossum - 05 Mar 2008 21:15 GMT
>Hello,
>
[quoted text clipped - 5 lines]
>
>Example, the 2 strings could be: 1) script 2) text
It might be simpler and more maintainable to separate the two
searches.
Pseudocode:
for each string str in lines[] do
if (str contains "script" and str contains "text") then
doStuff(str)
endif
endfor
rossum