I am trying to find the first image from the content. Using Regex
<imgs+((width|height|border|classs|id|src|usemap|hspace|vspace)=”[^"]+”s*)+>
The function is used as
<?php
$content="<img src='s' height='20' >";
preg_match("/<imgs+((width|height|border|classs|id|src|usemap|hspace|vspace)=”[^"]+”s*)+>
/" ,$content,$matches);
var_dump($matches);
?>
But i get a syntax error. I want to handle all possible cases for img tags, how can this be done? I need the src attribute of the tag.