JavaScript RegExp {X,} quantifier
The JavaScript RegExp object
Definition and Usage
n{XThe {X,} quantifier matches a string containing at least X n occurrences of the preceding sequence.
X Must be a number.
Syntax
new RegExp("
n
{
X,
}")
Or a simpler way:
/
n
{
X,
}/
Browser support





All major browsers support the {X,} quantifier
Example
Example
Perform a global search for substrings containing a sequence of at least three digits:
var
str
=
"
100, 1000 or 10000?
"
;
var
patt1
=/\
d
{
3
,
}
/
g
;
The text marked below shows where the expression found matches:
100
,
1000
or
10000
?
Try it »
The JavaScript RegExp object