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
r"
(?:^|,\s*)(20\d\d(?:r\d+)?)(?=,|$)
"
gm
Input 1
1
New
2018, \\\\some\\directory\\is\\here, \\\\some\\directory\\is\\here, 2019, \\\\here\\is\\another\\directory, \\\\here\\is\\another\\directory, 2021, \\\\here\\is\\another\\path_2021, 2020, http://some.will/even/look/like/this, 2022r2, 2023