I'm looking for a pattern that can match URL addresses in order to wrap them with an anchor tag. Something like:
Code: Select all
preg_replace($pattern, '<a href="$1">$1</a>', $text);
Where the pattern could match any simple URL address,
with or without the protocol. Somehow I'd figured I could google my way to this, but have been failing miserably.