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"
(?m)(?<=\()(?:\d{4}|\d{2}-\d{2})(?=\))
"
g
Input 1
1
New
random text here (00-04) more random text lame text (junk data) more text (08-12) random text (2008) random text (2005) junk text (junk) nothing important (13-15) not important (not important)
Extraction