This is the Rhino version of bug 104375 against SpiderMonkey. The testcase for this is mozilla/js/tests/ecma_3/String/regress-104375.js
Created attachment 88787 [details] [diff] [review] Patch to RegExpImpl.java to fig #122167 I hit this bug so I thought I'd fix it. Using the spidermonkey fix, I produced the patch attached. Rhino passes ecma_3/String/regress-104385 after applying.
I just checked in a fix for this (pretty much ditto your patch) since I was just all over the RegExp stuff; sorry to tread on your toes.
Verified Fixed. With the new RegExp engine in Rhino (see bug 153223) the above testcase passes in both compiled and interpreted modes. Morten: thank you for your interest in this!
Targeting as resolved against 1.5R4