Subj : Re: lastIndex property of newly created RegExp object To : netscape.public.mozilla.jseng From : Martin Honnen Date : Tue Nov 30 2004 01:22 pm Brendan Eich wrote: > See 7.8.5 Regular Expression Literals: > > A regular expression literal is an input element that is converted to a > RegExp object (section 15.10) when it is scanned. The object is created > before evaluation of the containing program or function begins. > Evaluation of the literal produces a reference to that object; it does > not create a new object. > So the SpiderMonkey and Rhino engines create one RegExp object for each > source Regular Expression Literal, before evaluation of the containing > program or function begins (i.e., "when [the literal] is scanned"). Thanks for clarifying. -- Martin Honnen http://JavaScript.FAQTs.com/ .