How do you find all files with two separate words?

In VS2010, would there be a regular expression for "Find in Files" to search for all source files containing two separate words, regardless of line breaks?

As an example, I want to find any source file containing 'This' and 'That'.

I tried something like this, but this did not work:

((This). * \ N *. * (That))

+4
source share
2 answers

'this' followed by something, including a new line followed by 'this',
or
'that' followed by something, including a new line, and then 'this':

((this)(.*\n)*.*(that))|((that)(.*\n)*.*(this)) 
+10
source

It’s easier for me to just do this, for example:

 select|insert|update|delete 

Note. Searching for regular expressions requires a search in VS. The word order does not matter.

So, we get something like this: enter image description here

0
source

Source: https://habr.com/ru/post/1398296/


All Articles