A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/RegExp/unicode below:

unicode ยท WebPlatform Docs

unicode Summary

Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular expression. Default is false. Read-only.

Syntax
regex.unicode
Examples

The following example illustrates the use of the Unicode property.



var string = 'a๐Œ†b';

console.log(/a.b/.unicode);


console.log(/a.b/.test(string));


console.log(/a.b/u.unicode);


console.log(/a.b/u.test(string));


var match = string.match(/a(.)b/u);
console.log(match[1]);

View live example

Remarks

The unicode property returns true if the Unicode flag is set for a regular expression, and returns false if it is not.

The Unicode flag, when used, enables various Unicode-related features for regular expressions, such as the use of ES6 Unicode code point escapes (e.g. /\u{1D306}/u).

See also Related articles Javascript Other articles External resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4