Skip to content

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

@mathiasbynens

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions