Bug 3450

Summary: String.replace() method not working when regex pattern contains {n, m}
Product: WebKit Reporter: Stuart Morgan <stuartmorgan>
Component: JavaScriptCoreAssignee: Maciej Stachowiak <mjs>
Status: VERIFIED FIXED    
Severity: Normal    
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Testcase
none
Fix bug darin: review+

Description Stuart Morgan 2005-06-11 17:44:27 PDT
The string.replace() method fails with regexes that use {n,m} style ranges.

Apple Bug: rdar://3881901
Comment 1 Stuart Morgan 2005-06-11 17:44:47 PDT
Created attachment 2257 [details]
Testcase
Comment 2 Anders Carlsson 2005-06-20 06:17:06 PDT
Created attachment 2496 [details]
Fix bug

There is a problem with the length calculation in pcre_compile which makes some
ranges not work when using UTF-16. This patch solves the problem similarly to
how never versions of pcre solves it with UTF-8.
Comment 3 Darin Adler 2005-06-20 08:40:56 PDT
Our PCRE is based on version 3.9, and the latest is 5.0. Should we also merge in a newer PCRE?
Comment 4 Darin Adler 2005-06-20 08:45:10 PDT
Comment on attachment 2496 [details]
Fix bug

r=me