Page 1 of 1

[cantfix] Regex: wrong expression leads to infinite loop

Posted: 02.06.2015 16:33
by pbensch
Just stumbled over an endless loop while unintentionally using a wrong regular expression to replace a substring of an image filename, e.g. "img_01." to "img_001.":

Wrong img_([0-9]){2}\.png
Correct img_([0-9]{2})\.png

It is reproducible using a text file containing:
  • img_1.png
    img_2.png
    img_3.png
    img_01.png
    img_02.png
    img_03.png
All unsaved changes are lost if this endless loop starts running. :cry:
Maybe the regular expression check is not complete yet to avoid that?

Kind regards,
Peter

Posted: 01.08.2015 09:26
by Alexey
RE syntax check is ok. Expression syntax correct (brackets ok).Cannot fix so and I don't know RE code

Posted: 02.08.2015 06:08
by pbensch
Alexey wrote:don't know RE code
Is the RE code imported as library or where does it come from?

Posted: 02.08.2015 06:33
by Alexey

Posted: 02.08.2015 12:57
by pbensch
Ok, I'll check the RE parser, if there is something missinterpreted.
It'll take it's time, maybe somebody else is faster.