Regex for getting the links in a url
Hello all,
I am programming a caching service in python and I want to allow people to declare the content of interest that should be cached. I am trying to allow this using regex, so can I get some help with :
a) what's the regex that says cache everything in a domain if the request comes as
{“expr”:http://site.com/*}
(i am guessing that * is not correct)
b) the regex that says cache everything from site.com that is mp4
{“expr”:http://site.com/*.mp4}
c) the regex that says cache everything that is mp4
{“expr”:http://*/*.mp4}
I am new to regex and I guess that for an experienced programmer it won't be difficult to help me.
|