Skip to content

[RegExp] Match updated spec for /\w/iu and /\W/iu #1181

Description

@mathiasbynens

Now that tc39/ecma262#525 has landed, \u017F (LATIN SMALL LETTER LONG S) and \u212A (KELVIN SIGN) are word characters for /iu patterns.

Expected vs. actual behavior:

/\w/iu.test('\u017F') // true
/\w/iu.test('\u212A') // true
/\W/iu.test('\u017F') // false, actual: true
/\W/iu.test('\u212A') // false, actual: true
/\W/iu.test('s')      // false
/\W/iu.test('S')      // false
/\W/iu.test('K')      // false
/\W/iu.test('k')      // false

See also

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions