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
/
(Sample2).*(\d{2}-\d{2}-\d{4}).*(?<=[a-z]_)(\d+)(?=_\d+).*(?<=_)(\d+)$
/
i
Input 1
1
Sample1_Sample2_1_05-11-2015_0_Sample3-AB_C_D_045_4_Sample4_123456
Substitution
Sample1_Sample2_1_05-11-2015_0_Sample3-AB_C_D_045_4_Sample4_123456