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

RegExp \xxx metacharacter

JavaScript RegExp \xxx metacharacter

RegExp Object Reference JavaScript RegExp Object


Definition and Usage

The \xxx metacharacter is used to find a character specified by an octal number xxx (the specified character).

If no match is found, null is returned.

Syntax

new RegExp("

\xxx

")

Or a simpler way:

/

\xxx

/


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the \xxx metacharacter


Example

Example

Perform a global search for octal 127 (W) in the string:

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

var patt1=/\127/g;

The text marked below shows where the expression found matches:

Visit Runoob. Hello

W

orld!

Try it »


RegExp Object Reference JavaScript RegExp Object