[X] $regexp non-greedy fails


#1

$regexp(axxxz,x.*?z,) give a rather than axx as documented:

http://www.help.mp3tag.de/en/options_format.html#regexp
Non-greedy repeats
Non-greedy repeats are possible by appending a '?' after the repeat; a non-greedy repeat is one which will match the shortest possible string.


#2

You have to keep in mind that regular expressions are evaluated from left to right.

Considering your example, the engine starts at a

  1. a does not match against the pattern
  2. x does match partially and gets consumed
  3. x does match partially and gets consumed
  4. x matches because it is followed by a z and both get consumed.

Not a bug in the regexp engine.