JavaScript RegExp \xxxMetacharacter
JavaScript RegExp Object
Definition and Usage
The \xxx metacharacter is used to find the character specified by an octalxxxnumber.
If no match is found, null is returned.
Syntax
new RegExp("\xxx")
Or in a simpler way:
/\xxx/
Or in a simpler way:
/\xxx/
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the \xxx metacharacter
Example
Example
Perform a global search for octal 127 (W) in a string:
var str="Visit Example. Hello World!";
var patt1=/\127/g;
var patt1=/\127/g;
The textmarked belowshows the position where the expression obtained a match:
Visit Example. Hello World!
Try it Yourself »
JavaScript RegExp Object Other Extensions