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+

Stuart Morgan
Reported 2005-06-11 17:44:27 PDT
The string.replace() method fails with regexes that use {n,m} style ranges. Apple Bug: rdar://3881901
Attachments
Testcase (1.71 KB, text/html)
2005-06-11 17:44 PDT, Stuart Morgan
no flags
Fix bug (2.16 KB, patch)
2005-06-20 06:17 PDT, Anders Carlsson
darin: review+
Stuart Morgan
Comment 1 2005-06-11 17:44:47 PDT
Created attachment 2257 [details] Testcase
Anders Carlsson
Comment 2 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.
Darin Adler
Comment 3 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?
Darin Adler
Comment 4 2005-06-20 08:45:10 PDT
Comment on attachment 2496 [details] Fix bug r=me
Note You need to log in before you can comment on or make changes to this bug.