RegExp \ uxxxx metacharacter
Definition and Usage
\ uxxxx metacharacters used to find a hexadecimal numberxxxxspecified Unicode character.
If no match is found, it returns null.
grammar
new RegExp("\uxxxx")
或者更简单方式:
/\uxxxx/
或者更简单方式:
/\uxxxx/
Browser Support
All major browsers support \ uxxxx metacharacter
Examples
Examples
In a string of hexadecimal 0057 (W) global search:
var str="Visit W3Schools. Hello World!";
var patt1=/\u0057/g;
var patt1=/\u0057/g;
The marked text below shows where the expression gets a match:
Visit W 3Schools. Hello W orld!
try it"
JavaScript RegExp Object