RegEx帮助:仅在尚未链接时匹配http:// <a href="http://

时间:2015-07-04 03:24:59

标签: php regex preg-replace

<p>I have this little RegEx in a preg_replace that replaces a plain text url into a url with a link and it works great.</p> <pre><code>preg_replace(" "\b(https?:="" \s+)"',="" '<a="" href="$1" >$1<="" a>',="" $test) <="" code="">

I do not get RegEx even after ready multiple tutorials, so am just looking for some help on how it might be possible to do what I need. Some of the links in the text will already be setup as a link (http://www.test.com'>Site Name) and I need those not to turn into links.

Is this possible, and any help on how to do it?

Thanks For Any Help Chris

0 个答案:

没有答案