-2
可能重复:
RegEx match open tags except XHTML self-contained tags如何preg_replace一个HTML(A)标签?
这是一个标签代码:
<a href="http://google.com/">Google</a>
如何使用的preg_replace函数提前加http://google.com/
另一个URL例如:
不更改:
<a href="http://google.com/">Google</a>
更改后:
<a href="http://myurls.com/index.php?to=http://google.com/">Google</a>
看到有?? !!
我原来的URL
现在前加入http://myurls.com/index.php?to= ,,
它是如何通过的preg_replace做了什么?
感谢名单
[不要温和地走进那个良夜,风靡一时..怒斥光明的消逝(HTTP://www.bigeye。 com/donotgo.htm)..然后使用适当的DOM解析器。 – 2012-04-12 19:33:58