Bugs: Browse | Submit New | Admin

[#9200] Problem with long regular expressions

Date:
2007-03-12 10:42
Priority:
3
Submitted By:
Alessandro Morandi (simbul)
Assigned To:
Shyouhei Urabe (shyouhei)
Category:
Language / Runtime / Core Libraries
State:
Open
Platform:
 
Summary:
Problem with long regular expressions

Detailed description
I noticed a bug when working with very long regexps (around 32000 chars).

A simple regexp like /hello|AAAAAAAA/ does not match "hello" anymore when the number of "A"s is
greater than 32258.

Usually, when a regexp is too long to be managed, Ruby issues a "regular expression too big" exception, but
in this case it just stops working correctly, without any warning.

A test case is attached.
The bug has been verified on both Windows and Mac OSX.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
longregexpbug.rb Test case to replicate bug Download

Changes:

Field Old Value Date By
assigned_tonone2007-06-12 03:22zenspider
category_idNone2007-06-12 03:15zenspider
File Added1566: longregexpbug.rb2007-03-12 10:42simbul