I want to find all links in the text like this:
Test text http://hello.world Test text http://google.com/file.jpg Test text https://hell.o.wor.ld/test?qwe=qwe T
Alternative to regexp it´s use this library
Works very good, butnot for very complex codes.
foreach($html->find('a') as $element) echo $element->href . '';
And easy to use. No regular expressions skills required:-)