Author Topic: RegEx search totally fails...  (Read 9485 times)

CodeKiller

  • Newbie
  • *
  • Posts: 1
    • View Profile
RegEx search totally fails...
« on: July 13, 2021, 18:25:09 »
Hello,

I cannot make the search with regex to work.
A simple a.* (technically anything starting with a "a") does not work...
But if I search for .*\.jpg this is working...
If I add a "a" in front, it does not work...
I checked the box for case sensitive, indeed.

An other stranger test in attachement. It find 2 files but not all...  :-\

Seriously...

Thanks.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4386
    • View Profile
    • Multi Commander
Re: RegEx search totally fails...
« Reply #1 on: July 13, 2021, 20:09:58 »
MC is not using its own regex engine. It is using a standard engine in the language set to ECMAScript support.. so I think it follow the same RegEx rules are JavaScript

I'm no regex guru. So I don't know how whats needs to be written in regex to match what.

But the test with a.* and C.*\.jpg works for me with regex. it find all files starting with a* or C*.jpg

(case sensitive? That is not for matching filename. That is always ignore case, the flag for Ignore case is for file content when matching file content)
« Last Edit: July 13, 2021, 20:20:32 by Mathias (Author) »