← Back to release summary

Unicode property escapes in regular expressions

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 64)
Intent stage
None

Summary

The Unicode Standard assigns various properties and property values to every symbol. For example, to get the set of symbols that are used exclusively in the Greek script, search the Unicode database for symbols whose Script property is set to Greek. Unicode property escapes are a new type of escape sequence available in regular expressions that have the `u` flag set. They enable querying the Unicode database for certain properties and values. E.g. `/\p{Script=Greek}/u.test('π') === true`

Standards & signals

Docs: https://mathiasbynens.be/notes/es-unicode-property-escapes https://developers.google.com/web/updates/2017/07/upcoming-regexp-features#unicode_property_escapes

View on chromestatus.com