Actions
Bug #19467
closedSome linear_time regexp does not match in linear time
Description
Regexp.linear_time?(/\A.*a.*x\z/) #=> true
but it does not match in linear time
Regexp.linear_time? /\A(.*a.*)x\z/ #=> true
/\A(.*a.*)x\z/ =~ 'a'*100000+'y' #=> nil, processing time: 0.016995s
Regexp.linear_time? /\A.*a.*x\z/ #=> true
/\A.*a.*x\z/ =~ 'a'*100000+'y' #=> nil, processing time: 21.479335s
Actions
Like0
Like0Like0Like0Like0