Nearly, when i write code with preg_match.Like this
$string = <<<ETO
<svg "[^>]*? width="480.24px" height="360px" viewBox="0 0 480.24 360" enable-background="new 0 0 480.24 360" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
ETO;
preg_match('/<svg[^>]*?width=[\'|"]{1}(.*?)[\'|"]{1}[^>]*?>/is', $string, $svginfo);
the $svginfo
got null.
Sorry about this. I know [^>]*?
should not be there in svg.
But when someone posts this I need to get the width info from this content.
Can anyone explain how to do this?