This topic has probably been discussed to death, but I would like to know what the best way to recognize URLs in story body.
I have a story archive, where some stories have URLs in them. I want to dynamically make them "clickable". In other words, a URL is in the story body. I want my php to take URL and make it <a href="URL">URL</a>.
The first part is easy... match "http://"... However, its the end part that gets me. How do I build my regexp match so it accurately grabs these URLs?
So what's the best way to do this? Suggestions....??