« Bugzilla Issues Index

#913 — needs a search algorthm

In " (regexp)",
step 7 says:
Search the value string from its beginning for an occurrence of the
regular expression pattern rx. ...

This seems vague. Compare to String.prototype.match, which (at a point roughly analogous to search's step 7) calls RegExpExec, which goes into great detail about how to apply a regexp to a string.

I understand that 'search' can't call RegExpExec, because RegExpExec *doesn't* ignore the regexp's 'lastIndex' and 'global' properties. But it seems like there should be something of comparable detail. now delegates to but it has the same vague language that used to be in the String method. However, there is already a margin TODO comment that says better spec. language is needed.

Changed the title of this bug so it relates to RegExp search

fixed in rev23 editor's draft

fixed in rev23 draft