Daily Archives: Apr 14, 2008

Simple RegEx for matching URLs

I wanted a simple regular expression to retrieve URLs from a paragraph of text, but a google search returned so many Regular Expressions that it was tough to separate the good from the bad. So here are two tried and tested Perl Compatible Regular Expressions (PCRE) to help match URLs: A simple one to match […]