The string.replace() method fails with regexes that use {n,m} style ranges. Apple Bug: rdar://3881901
Created attachment 2257 [details] Testcase
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.
Our PCRE is based on version 3.9, and the latest is 5.0. Should we also merge in a newer PCRE?
Comment on attachment 2496 [details] Fix bug r=me