RegExp \ xxx metacharacter
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/
或者更简单方式:
/\xxx/
Browser Support
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;
var patt1=/\127/g;
The marked text below shows where the expression gets a match:
Visit W 3Cschool. Hello W orld!
try it"
JavaScript RegExp Object