Latest web development tutorials

RegExp \ uxxxx metacharacter

RegExp Object Reference JavaScript RegExp Object

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/


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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;

The marked text below shows where the expression gets a match:

Visit W 3Schools. Hello W orld!

try it"


RegExp Object Reference JavaScript RegExp Object