Regex with negativ look ahead

General discussion related to "Everything".
Mokhtar
Posts: 1
Joined: Wed Mar 15, 2017 12:24 pm

Regex with negativ look ahead

Postby Mokhtar » Wed Mar 15, 2017 12:36 pm

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

void
Site Admin
Posts: 3180
Joined: Fri Oct 16, 2009 11:31 pm

Re: Regex with negativ look ahead

Postby void » Sun Mar 19, 2017 10:04 am

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/


Return to “General”