[cantfix] Regex: wrong expression leads to infinite loop
Posted: 02.06.2015 16:33
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:
Maybe the regular expression check is not complete yet to avoid that?
Kind regards,
Peter
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
Maybe the regular expression check is not complete yet to avoid that?
Kind regards,
Peter