开发者

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

开发者 https://www.devze.com 2023-04-01 00:43 出处:网络
This question already has answers here: Closed 11 years ago. 开发者_JAVA技巧Possible Duplicates: Best methods to parse HTML with PHP
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

精彩评论

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

关注公众号