Latest web development tutorials

RegExp \ xxx metacharacter

RegExp Object Reference JavaScript RegExp Object

Definition and Usage

\ xxx metacharacter is used to find an octal numberxxxpredetermined characters.

If no match is found, it returns null.

grammar

new RegExp("\xxx")

或者更简单方式:

/\xxx/


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support \ xxx metacharacter


Examples

Examples

In a string of octal 127 (W) global search:

var str="Visit W3Cschool. Hello World!";
var patt1=/\127/g;

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

Visit W 3Cschool. Hello W orld!

try it"


RegExp Object Reference JavaScript RegExp Object