How php can parse html to find links in user input? [duplicate]
开发者_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
精彩评论