Say I have the following set of urls in a db
url data
^(.*)google.com/search foobar
^(.*)google.com/alerts barfoo
^(.*)blah.com/foo/(.*) foofoo
... 100's more
Given any url in the wild, I would like to check to see if that url belongs to an existing set of urls and get the corresponding data field.
My questions are:
- How would I design the db to do it
- django does urlresolution by looping through each regex and checking for a match given that there maybe 1000's of urls is this the best way to approach this?
- Are there any existing implementations I can look at?