Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(x+x+)+y
/
gm
Input 1
1
New
xxxxxxxxxxxxxxxx Catastrophic backtracking example: Note the pattern looks fairly simple, but it needs over 80000 steps to decide it is not a match. With just 16 'x' it already takes a large amount of steps to finally decides it does not work. (click "regex debugger" on the left to see details on steps taken) See https://www.regular-expressions.info/catastrophic.html for more info.
Extraction