Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
A(?:(?![A-Z]{2}).)*?(\d+)
/
gm
Input 1
1
New
A bcd 1 should match and capture 1 Abcd1 should match and capture 1 A bcd A BCd 1 A bcd 1 EF must start with an A followed by any count of anything unless it's two consecutive upper case letter followed by a number (which should be captured)