Menu
Hello people
I would like to use regular expression to check if a string contains the definition of background-image:url(<file>.png) attribute
that is in the following strings the attribute will be found:
style=”background-image: url(‘test.png’)”
style=”background-image: url(‘/Folder/test.png’)”
style=”background-image: url(‘./folder/Test.png’)”
I tried the following but it doesn’t work:
[code=php]
preg_match_all(‘/background-image:s*url(‘(.*.png)’);/Uis’,$s, $matches);
However count($matches[0]) is always zero
can anyone see what is wrong with the regular expression, or maybe something is wrong in my examples
thanks