According to the 5th edition of JavaScript The Definitive Guide (page
208) the ECMAScript v3 spec indicates that it is not a supported
feature.  The only flags it mentions as being supported are i, g, and
m.

That edition is from August 2006.

Scanning through the 5th edition of ECMA-262 -
http://www.ecmascript.org/docs.php - the only regular expression flags
that are mentioned ( page 193, page 203 of 252 in the PDF ) are i, g
and m:

--------------------

15.10.4.1 new RegExp(pattern, flags)
If pattern is an object R whose [[Class]] internal property is
"RegExp" and flags is undefined, then let P be the
pattern used to construct R and let F be the flags used to construct
R. If pattern is an object R whose [[Class]]
internal property is "RegExp" and flags is not undefined, then throw a
TypeError exception. Otherwise, let P
be the empty String if pattern is undefined and ToString(pattern)
otherwise, and let F be the empty String if
flags is undefined and ToString(flags) otherwise.

If the characters of P do not have the syntactic form Pattern, then
throw a SyntaxError exception. Otherwise
let the newly constructed object have a [[Match]] internal property
obtained by evaluating ("compiling") the
characters of P as a Pattern as described in 15.10.2.

If F contains any character other than "g", "i", or "m", or if it
contains the same character more than once,
then throw a SyntaxError exception.

--------------------

Is there a JavaScript engine that has added support for an s flag?
Where did you see a reference to s flag support in JavaScript?



On Tue, Feb 16, 2010 at 10:45 AM, Wade Preston Shearer
<[email protected]> wrote:
> I was using the new 's' regex flag in a javascript expression, but it caused 
> Firefox to barf (stated that it's not valid). It appears that Firefox simply 
> does not support it yet. I have been searching but cannot find any official 
> documentation on this. Does anyone know if any exists?



-- 
Joseph Scott
[email protected]
http://josephscott.org/

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to