How can I do a logical AND search in Delphi using Find in Files?

Now that my code is getting bigger, the key code location search strategy is more important. With a fast PC, now “Search” “Find in Files” quickly and efficiently - “Search for all files in a project” often does not work if you used implicit units. I struggled to understand regular expressions, but they supposedly allowed me to do a search, for example:

one or two

one and two

All searches should be on the same line.

This will be a good improvement to a simple keyword search. Is this possible in finding Delphi? I use XE, XE2 and D7 (sometimes).

+5
source share
1 answer

The regular expression to find for oneor twois

one|two

The symbol |means orin regular expression.

Finding a file that contains both one, and two, is more difficult, since the search is line-oriented. You can search for oneand twoin the same line, as here:

one.*two|two.*one
+6
source

All Articles