News:

MultiCommander v16.6 is released!

Main Menu

Non-greedy dot is not supported

Started by Turpal, September 14, 2023, 09:06:44

Previous topic - Next topic

Turpal

Why non-greedy dot is not supported in Multi commander?
The regex
\s\(ASOT.*?\)| throws this error.

In this thread you say that MC has ECMA-complient Regex engine, and ECMA supports .? pattern perfectly. Why MC not?

UPDATE: even this pattern without non-greediness throws error
\s\(ASOT.*\)|

and this too
\s\(ASOT[^)]*\)|

The most odd thing that it is showing correct transformation in live preview but the error is thrown when I press Start to start the renaming

Mathias (Author)

#1
MC do not have its own regex engine. it is using the reqex engine that is included in C++. the option for the regex engine is set to be ECMA, but I don't know if they are any exception or if you need to write in other way.  What it support and not, I don't know. I got it to work with most pattern I tried but Im no regex expert. I don't understand what your are trying to so with the regex