Today my wish is to take text form the string. This string must be, between last slash and .partX.rar or .rar
First I tried to find edge's end of the word and then the beginning. After I get that two elements I merged them but I got empty results.
String:
http://hosting.xyz/1234/15-game.part4.rar.html
http://hosting.xyz/1234/16-game.rar.html
Regex:
Begin:(([^/]*)$)
- start from last /
End:(.*(?=.part[0-9]+.rar|.rar))
stop before .partX.rar
or .rar
As you see, if I merge that codes I won't get any result. What is more, "end" select me only .partX instead of .partX.rar
All what I want is:
15-game.part4.rar
and 16-game.rar
What i tried:
(([^/]*)$)(.*(?=.part[0-9]+.rar|.rar))
(([^/]*)$)
(.*(?=.part[0-9]+.rar|.rar))
I tried also
/[a-zA-Z0-9]+
but I do not know how select symbols.. This could be the easiest way. But this select only letters and numbers, not -
or _
.
If I could select symbols..