Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

RegExp \xdd metacharacter

JavaScript RegExp \xdd metacharacter

RegExp Object Reference JavaScript RegExp Object


Definition and Usage

The \xdd metacharacter finds characters specified by a hexadecimal number dd (the specified character).

If no match is found, null is returned.

Syntax

new RegExp("\x

dd

")

Or a simpler way:

/\x

dd

/


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the \xdd metacharacter.


Example

Example

Perform a global search for hexadecimal 57 (W) in the string:

var str="Visit Runoob. Hello World!";

var patt1=/\x57/g;

The text marked below shows where the expression found matches:

Visit Runoob. Hello

W

orld!

Try it »


RegExp Object Reference JavaScript RegExp Object