Subj : Re: SpiderMonkey RegExp rewrite has landed To : netscape.public.mozilla.jseng From : thomas@snailshell.de (Thomas Much) Date : Thu Oct 23 2003 07:21 pm Phil Schwartau wrote: > A new landing has gone in, rewriting the regular expression engine > in SpiderMonkey. Speaking of... If I create a regular expression, say re = /abc/ and replace its content with re.compile("") I get the empty regexp. Now, if I call s = re.toString() I get "//" as the result in most browsers (Mozilla, IE, Opera, iCab) - which is fine for display. But if I call Mozilla's toSource(), I get the same, although it is no valid source code for a regular expression. Shouldn't we better return "/(?:)/" (as mentioned in ECMA262 7.8.5) for this special case? And BTW: Is /a/("abc") // Mozilla's extension to ECMA262 the same as /a/.exec("abc") // ECMA262 standard ? bye, Thomas .