Code: Select all
<a href="http://www.domain.com">Code: Select all
(\"|\'|)([\w\W])*?\1Now, I can hear you all shouting that a URL can only contain certain characters, so why not just test for those. However, the scenario this is going to be used in is slightly different in that the URL could be replaced by anything, possibly even single/double quotes.
Sooo, the URL should only not contain what it is being surrounded by essentially. I am sure there is an easy way to do this but it has escaped me for the time being.
Thanks for your help,
someberry