192
rated 0 times
[
197]
[
5]
/ answers: 1 / hits: 15444
/ 14 Years ago, fri, june 25, 2010, 12:00:00
I'm trying to match URLs with wildcards in them to actual URLs. For example:
http://*google.com/*
Needs to match
http://maps.google.com
And
http://www.google.com/maps
What would be the best way of going about this?
I've tried using a regular expression and that works fine when I manually program it but I'm not sure whether it's possible to dynamically generate regular expressions or if that would be the best practice in this situation.
/(http|https)://.*.?google.com/?.*/i
Thanks very much.
More From » regex