JavaScript RegExp + Modifier
Complete RegExp Object Reference
Definition and Usage
When the + modifier is set the regular expression finds one or more of a
specific character.
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 any substring with a 1
followed by one or more "0" characters:
var str = "1, 100 or 1000?";
var patt1 = /10+/g;
|
The marked text below shows where the RegExp gets a match:
Try-It-Yourself Demos
+
How to use the "+" modifier to find one or more of a character 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!
|
|