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
/
\w(\d+_\d+_)\w+
/
gm
Input 1
S1_2_S1_test.txt S2_2_S18_test.txt S3_2_S9_test.txt
Extraction
S1_2_S1_test.txt S2_2_S18_test.txt S3_2_S9_test.txt