I'm trying to find files in all dirs except XXX YYY. regex:^((?!XXX YYY).)*$ doesn't work (result is empty).
ES doesn't work to ... I'm trying the latest versions. What I'm missing?
I'm aware about exclude option, but in this case it isn't suitable for me
I need help with regex.
-
void
- Developer
- Posts: 19903
- Joined: Fri Oct 16, 2009 11:31 pm
Re: I need help with regex.
For example, to exclude C:\Program Files with regex:
regex:"^((?!C:\\Program Files).)*$"
Use double quotes (") to escape spaces.
Escape backslashes (\) with a backslash (\).
It might be easier (faster too) to use NOT regex:
!regex:"^C:\\Program Files"
regex:"^((?!C:\\Program Files).)*$"
Use double quotes (") to escape spaces.
Escape backslashes (\) with a backslash (\).
It might be easier (faster too) to use NOT regex:
!regex:"^C:\\Program Files"
-
ovg
- Posts: 295
- Joined: Thu Oct 27, 2016 7:19 pm
Re: I need help with regex.
Excellent!!! Thank you VERY MUCH for help.
-
ovg
- Posts: 295
- Joined: Thu Oct 27, 2016 7:19 pm
Re: I need help with regex.
Hi, David!
Your suggestions doesn't work with ES - can you help me or this is limitation of ES?
Your suggestions doesn't work with ES - can you help me or this is limitation of ES?
-
void
- Developer
- Posts: 19903
- Joined: Fri Oct 16, 2009 11:31 pm
Re: I need help with regex.
They should work, I've just tested these searches with ES 1.1.
Please try ES 1.1.
es.exe regex:"^((?!C:\\Program Files).)*$"
es.exe !regex:"^C:\\Program Files"
Please try ES 1.1.
es.exe regex:"^((?!C:\\Program Files).)*$"
es.exe !regex:"^C:\\Program Files"
-
ovg
- Posts: 295
- Joined: Thu Oct 27, 2016 7:19 pm
Re: I need help with regex.
Thank you very much again!