JavaScript RegExp \xdd Modifier
Complete RegExp Object Reference
Definition and Usage
When the \xdd modifier is set the regular expression finds an ASCII character
expressed by hex code
The "dd" characters inside the brackets can be any hex code matching an ASCII
character.
Syntax
new RegExp("\xdd")
OR
/\xdd/
|
|
Example
In the following code we will do a search for "W":
var str = "Visit W3Schools";
var patt1 = new RegExp("\x57");
|
The white spaces in the text below will get a
match:
Try-It-Yourself Demos
/xdd
How to use the "/xdd" modifier to find occurrences of an ASCII
character specified by a hex value using a regular expression object.
/xdd
How to use the "/xdd" modifier to find occurrences of an ASCII
character specified by a hex value using a string object.
Complete RegExp Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|