From: Simon Strandgaard Date: 2004-11-19T06:34:57+09:00 Subject: Re: Anchored Regexp get stalled or hung On Thursday 18 November 2004 22:20, Joel VanderWerf wrote: > rnicz wrote: > > /^-{128}/ > > > > hangs interpreter. Is it a bug or not? > > Fwiw, I can reproduce the hang in 1.8.2 but not in 1.9.0. Maybe it's > something that Oniguruma fixes. I can reproduce this problem in 1.8.1. I guess this is a bug in the GNU engine. This is show off.. my own regexp engine can deal with /^-{128}/ bash-2.05b$ irb irb(main):001:0> re = NewRegexp.new("^-{128}") => #, @register=1>, @min=128, @index=nil, @pattern=#>>>>, @register=0>, @parser=+-Sequence +-Anchor line_begin +-Repeat greedy{128,128} +-Inside set="-">>> irb(main):002:0> re.match(("-"*128)+"x") => # irb(main):003:0> re.match(("-"*127)+"x") => nil irb(main):004:0> puts re.tree +-Sequence +-Anchor line_begin +-Repeat greedy{128,128} +-Inside set="-" => nil irb(main):005:0> (sorry for show off) -- Simon Strandgaard