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
/
^(([a-z]+)_([0-9]+)(_([0-9]+))*)\-([0-9]+)x([0-9]+)\-([0-9]{1})([0-9abcdef]{6}){0,1}\.(jpg|gif|png)
/
Input 1
New
attractions_300-217x168-1.jpg villa_27_11213-850x567-1.jpg
Extraction
attractions_300-217x168-1.jpg villa_27_11213-850x567-1.jpg