I have some URLs like below :
and
http://srv2.Example.com/movie/99/09/06/The.True.Adventures.of.Wolfboy.2019.720p.asli.mkv
Now I want select these Example.com URLs and index them. so need some regex for do it and export the path from it . I make regex, something like this :
http://[^/]+.Example.com/(?P[^?].(?:mp4|mkv))(.)
Problem: When use above Regex, the path that export for me is like :
path=movie/99/09/06/The.True.Adventures.of.Wolfboy.2019.720p.asli.mkv.T8d89281498deef0.mkv
but I want the regex that support both URLs and export the path like :
path=movie/99/09/06/The.True.Adventures.of.Wolfboy.2019.720p.asli.mkv
I appreciate it, if help me to write a regex to export the path from the URL like :
path=movie/99/09/06/The.True.Adventures.of.Wolfboy.2019.720p.asli.mkv
Best Regards,
Hamed Haghshenas
Is this what you want?
http:\/\/(?:[^\/]+\.)?Example\.com\/(?P<path>[^?]+?\.(?:mkv|mp4))
See the tests here
Thanks Dear I make some changes based on my environments and your Guides. Finally this solved my problem. http://[^/]+\.Example\.com/(?P<path>[^?]+?\.(?:mkv|mp4))