[cantfix] Regex: wrong expression leads to infinite loop

Did you find any problems using this software? Please post here...
Locked
pbensch
Posts: 3
Joined: 02.06.2015 16:13

[cantfix] Regex: wrong expression leads to infinite loop

Post 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
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

RE syntax check is ok. Expression syntax correct (brackets ok).Cannot fix so and I don't know RE code
pbensch
Posts: 3
Joined: 02.06.2015 16:13

Post by pbensch »

Alexey wrote:don't know RE code
Is the RE code imported as library or where does it come from?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

pbensch
Posts: 3
Joined: 02.06.2015 16:13

Post 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.
Locked