Monday 25 November 2019

regex - Stop at first character match?

I want to fetch a certain html node in a large html text, but something in my regex is bad.




I want to fetch all urls that look like this:



 some stuff 


I am trying to do:



//



but sometimes it will work, but sometimes it will grab everything until the next close >.



Is there a way to rewrite this regex so it will stop at the first >?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...