I want to match every string like this
<img src="whatever" whatever alt="whatever" whatever height="any number but not 162" whatever />
in other words i want to match every string that, after the "link" contain whatever except the number 162 (entire number and not only the single character). I use this
function embed($strr) {
$strr = preg_replace('@<img.*src="([^"]+)"(?:[^1]+|1(?:$|[^6]|6(?:$|[^2]))) />@is', '[img]$1[/img]', $strr);
return $strr;
}
but this don't match everything that contain 1 and not 162. How can i solve?