[Webkit-unassigned] [Bug 35856] '\d' passed to the RexExp::create as 'd'
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 8 11:04:35 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=35856
Mark Rowe (bdash) <mrowe at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Mark Rowe (bdash) <mrowe at apple.com> 2010-03-08 11:04:35 PST ---
How is this not expected behavior? The JavaScript string literal ‘^\d+’ is
treated same as ‘^d+’ since \d is not a recognized escape sequence. This
happens long before regular expressions enter the picture. If you want the \d
to be treated as the regular expression meta-character you need to to escape
the backslash so that the string contains the characters \ and d in sequence,
e.g, ‘^\\d+’.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list