0

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.

4
  • You want to find <a> tags? CSS @include directives? src="..." attributes? links/hostnames in text nodes? Commented Aug 30, 2011 at 17:21
  • 4
    @see stackoverflow.com/questions/3577641/… Commented Aug 30, 2011 at 17:26
  • I want to find links in user input text. Commented Aug 30, 2011 at 19:26
  • 1
    @Graydot that's not what he's looking for Commented Aug 30, 2011 at 19:32

1 Answer 1

1

Read here in preg_match Manual Page.

The expression I would use:

/https?:\/?\/?[^\ ]+/i
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.