Need to get theme10
from catalog/view/theme/theme10/
I tried this:
preg_match('|catalog/view/theme/(.*)/|',$html, $theme);
Need to get theme10
from catalog/view/theme/theme10/
I tried this:
preg_match('|catalog/view/theme/(.*)/|',$html, $theme);
$matches = [] ;
$pattern = "@catalog/view/theme/([a-zA-Z0-9]+)/{0,1}@" ;
$string = "catalog/view/theme/theme10" ;
preg_match($pattern, $string, $matches) ;
echo $matches[1] ;
Works with and without /
in the end.