Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

RegExp.prototype.unicodeSets

2 tags 1 category

The unicodeSets accessor property of RegExp instances returns whether or not the v flag is used with this regular expression.

RegExp.prototype.unicodeSets has the value true if the v flag was used; otherwise, false. The v flag is an “upgrade” to the u flag that enables more Unicode-related features. (“v” is the next letter after “u” in the alphabet.) Because u and v interpret the same regex in incompatible ways, using both flags results in a SyntaxError. With the v flag, you get all features mentioned in the u flag description, plus:

The p escape sequence can be additionally used to match properties of strings, instead of just characters. The character class syntax is upgraded to allow intersection, union, and subtraction syntaxes, as well as matching multiple Unicode characters. The character class complement syntax [^…] constructs a complement class instead of negating the match result, avoiding some confusing behaviors with case-insensitive matching. For more information, see Complement classes and case-insensitive matching.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…