Welcome Guest, Not a member yet? Register   Sign In
Need regex help to replace links in a string
#1

[eluser]ehicks727[/eluser]
I've got a string that I need to turn properly formatted urls into anchor text.

For example...

Code:
$string = "http://www.example.com"

turns into...

Code:
'<a href="http://www.example.com">http://www.example.com</a>'

I appreciate the help!! Thank you.


Messages In This Thread
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:32 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:45 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:47 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:55 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 12:01 PM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB