Recently I had to extract all img-Tags from a given HTML-String in Php. After some time googling around I was able to solve the problem with the following statement:
preg_match_all('/<img(.*?)\/>/s', $content, $images);
Though I have a rough clue about regular expressions in Php I wasn't able to figure out why (.*?) can be used as a placeholder between certain strings (in this case 'img' and '/>').
So can anyone give me a prober explanation of the regular expression (.*?)?