A translation of the Twitter Javascript URL Matching code (twitter-text-js) for PHP