R
rnicz
Dear rubyists!
I dare to post this question in spite of fact that lately there were
many posts about false RE bug reports.
I've tried to make following regexp
a=/^-{150}/
and it turns out that such expression hangs ruby interpreter.
I've checked that re{m,n} expression allows by design as much as
32766 repetitions. Expression such as
/-{32766}/
works fine, and
/-{32767}/
produces error message:
'too big quantifier in {,}: /-{32767})/'
But when regexp is anchored at front you can not specify more
than 127 repetitions:
/^-{127}/
is ok, but
/^-{128}/
hangs interpreter. Is it a bug or not?
I dare to post this question in spite of fact that lately there were
many posts about false RE bug reports.
I've tried to make following regexp
a=/^-{150}/
and it turns out that such expression hangs ruby interpreter.
I've checked that re{m,n} expression allows by design as much as
32766 repetitions. Expression such as
/-{32766}/
works fine, and
/-{32767}/
produces error message:
'too big quantifier in {,}: /-{32767})/'
But when regexp is anchored at front you can not specify more
than 127 repetitions:
/^-{127}/
is ok, but
/^-{128}/
hangs interpreter. Is it a bug or not?