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
r"
(?<=\*)(?:0\d{3}|1[0-8]\d{2}|19[0-2]\d)(?!\d)
"
gm
Input 1
New
'The **ALI**1929 for 90 days but not 77731929', 'For all **ALI**1952 28A 177945 ', 'But the **ALI**1914 and **ALI**1903 1912' *0040 *1234 *1299 *9999 *1952 *1727
Substitution
OLDER
'The **ALI**1929 for 90 days but not 77731929', 'For all **ALI**1952 28A 177945 ', 'But the **ALI**1914 and **ALI**1903 1912' *0040 *1234 *1299 *9999 *1952 *1727