Page 1 of 1

es.exe regex with anchors

Posted: Wed Mar 22, 2017 2:29 am
by aussieboykie
If I execute the following command:

es.exe -r -n 1 -sort date-modified-descending ^Word.exe$

The output is:

C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE

I don't expect WINWORD.EXE to match ^Word.exe$ so it looks like my regex start of word anchor ^ has been ignored, or else I am doing something wrong.

Regards, AB

Re: es.exe regex with anchors

Posted: Wed Mar 22, 2017 3:01 am
by void
Please use ^^ to escape a single ^

es.exe -r -n 1 -sort date-modified-descending ^^Word.exe$

^ is the escape character for the windows command prompt.
^\ = \
^& = &
^| = |
^> = >
^< = <
^^ = ^

I've added this help to the es help.

Re: es.exe regex with anchors

Posted: Wed Mar 22, 2017 4:04 am
by aussieboykie
Thanks. All good now.