开发者

How php can parse html to find links in user input? [duplicate]

This question already has answers here: Closed 11 years ago.

开发者_JAVA技巧Possible Duplicates:

Best methods to parse HTML with PHP

PHP Linkify Links In Content

I want to parse html to find links, but i want not only to find links like http://www.aaa.com, but also links like www.apple.com or just apple.com. I dont wand to find a tags. I want to find links in user input text.


Read here in preg_match Manual Page.

The expression I would use:

/https?:\/?\/?[^\ ]+/i
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜