[Webkit-unassigned] [Bug 24166] Regex: capture groups don't match on text longer than 49991 chars

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 28 09:16:15 PST 2009


------- Comment #8 from nk111 at gmx.de  2009-02-28 09:16 PDT -------
Here's another testcase which is a bit more realistic and very close to the
situation which I was investigating when I found this issue.


It's interesting. The character limit seems to be different again here. We have
some Text enclosed by <object> tags. Within are two groups we want to match. 

Test 1 will match and find the two groups. Group 1 includes all the "X" and
group 2 just the word "sometext".

In Test2 there is just one more "X" included. Test 2 will not match.

The text in test 3 is exactly the same like in test 2. But the regex searches
only one group. The one with the "X"s. Test 3 will match!

So the additional group and the long text break test 2.

Please notice. Test 2 will also match if I remove the question mark to do a
greedy search. But in my case it could be that there are more object tags in my
text like this:


That's why I need the the none greedy switch. Otherwise I would only get one
match including the whole text.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list