Code: Select all
$comment = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1">$1</a>', $comment);<a href="http://site.com">site</a>,
which upon edit then becomes
<a href="<a href="http://site.com">"<a href="http://site.com"></a>
How do I replace links in the to-be-edited text with their raw, unclickable form? (i.e. http://site.com). I'm not very familiar with preg_replace.
Thanks!