I have a CMS that uses a syntax based on HTML comments to let the user insert flash video players, slideshows, and other 'hard' code that the user could not easily write.
The syntax for one FLV movies looks like this:
<!--PLAYER=filename.flv-->
I use this code:
$find_players = preg_match("/<!--PLAYER\=(.*)-->/si", $html_content, $match);
This works great if there is only one player, $match[1] contains the filename (which is all I need)
My knowledge of regex is vanishing, so I'm not able to adjust this to grab more than one match.
If there are more on the page, it breaks totally, because it matches too greedily (from the first <!--PLAYER
to the last -->