in reply to regex to match URLs

I found this (untested) one for North American URLs by Brad Dobyns in the Regular Expression Library

Perhaps you can modify it for your specific purpose.
^(((ht|f)tp(s?))\://)?(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|m +il|net|org|biz|info|name|museum|us|ca|uk)(\:[0-9]+)*(/($|[a-zA-Z0-9\. +\,\;\?\'\\\+&%\$#\=~_\-]+))*$
Updated: Fixed wrapping in the code tags. Thanks for the tip ikegami.