Skip to content

Support ES6 /u flag #4

@mathiasbynens

Description

@mathiasbynens

The /u flag should enable a special parsing mode in which astral ranges can be used, and surrogate pairs only count as a single symbol (i.e. get matched by .).

See the example here, for example: http://mathiasbynens.be/notes/javascript-unicode#astral-ranges Currently regexp.js fails to parse the regular expression with the emoji ranges because ES5 doesn’t support it. But with the /u flag, ES6 will! Here’s a link to the demo page with the example prefilled: http://jviereck.github.io/regexp.js/#regexp=%5B%F0%9F%92%A9-%F0%9F%92%AB%5D&input=%F0%9F%92%AA

More info on the /u flag: http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/#RegExp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions