[Webkit-unassigned] [Bug 21414] New: Regular Expressions and character classes, shorthands and ranges

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 6 15:49:48 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21414

           Summary: Regular Expressions and character classes, shorthands
                    and ranges
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P3
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: iberndlu at googlemail.com


JavaScript has some difficulties with character classes and shorthands like
"\w" while using a hyphen as hyphen in a range.

JS example: 'hello_there'.replace(/[\w\-]+/, 'xxx')
This should return the string "xxx" like in Safari 3.1.2 or Firefox 3.x. The
current WebKit Build returns "xxx_there" because the character class shorthand
\w seems not to include the underscore anymore. Removing the "\-" of the range
fixes the bug.

For some reasons you cannot simply place a underscore within a character class
to fix the erratic behaviour related to the \w shorthand. The underscore must
be escaped (this is normally not necessary).


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list