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
/
\babc(\d+)_def((?!\1)\d{1,2})\b
/
g
Input 1
1
New
abc1_def23 abc10_def99 but does not match for: abc9_def9 abc9_def99 abc9_def123
Extraction