JavaScript RegExp . Modifier
Complete RegExp Object Reference
Definition and Usage
When the . modifier is set the regular expression matches the . character to
all characters except newline or other line terminators.
Syntax
new RegExp("regexp.")
OR
/regexp./
|
Parameter |
Description |
regexp |
Required. The rest of the regular expression to use |
Example
In the following code we will do a global search for "h.t" (will find "hat"):
var str = "That's that!";
var patt1 = new RegExp("h.t","g");
|
The marked text below shows where the RegExp gets a match:
Try-It-Yourself Demos
dot
How to use the "." modifier to find all the occurrences "h.t".
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!
|
|