gruber's url regular expression explained
regular expressions (aka regex) are very handy for defining patterns to look for when searching through text. without instruction on the matter though, they can look as cryptic as hieroglyphics. take john gruber’s liberal, accurate regex pattern for matching urls =>
\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))
alan storm does a nice job dissecting the regex to show how it works and suggests some areas for improvement.