JavaScript RegExp \uxxxx metacharacter
JavaScript RegExp Object
Definition and Usage
The \uxxxx metacharacter is used to find a character specified by a hexadecimal number xxxx (the specified Unicode character).
If no match is found, null is returned.
Syntax
new RegExp("\u
xxxx
")
Or a simpler way:
/\u
xxxx
/
Browser support





All major browsers support the \uxxxx metacharacter
Example
Example
Perform a global search for hexadecimal 0057 (W) in the string:
var str="Visit W3Schools. Hello World!";
var patt1=/\u0057/g;
The text marked below shows where the expression found matches:
Visit
W
3Schools. Hello
W
orld!
Try it »
JavaScript RegExp Object