Page 1 of 1

Regex with negativ look ahead

Posted: Wed Mar 15, 2017 12:36 pm
by Mokhtar
Hello, can anyone tell me how search for certain file names in certain paths excluding some directories? Regex is good but I can't use it with negative look ahead. I am doing Java and want to hit all files ignore ing generated.

Thanks a lot!
Mokhtar

Re: Regex with negativ look ahead

Posted: Sun Mar 19, 2017 10:04 am
by void
To search inside a list of folders, search for:
<C:\folder\subfolder\|"C:\folder\folder with spaces\"|"C:\program files\"|c:\Users\>

< > = group terms
| = OR

To exclude a list of folders, search for:
!<C:\folder\subfolder\|C:\windows\>

! = NOT

Combining these together:
Include C:\Windows, but exclude C:\windows\system32
c:\windows\ !c:\windows\system32

SPACE = AND

http://www.voidtools.com/support/everything/searching/