I've got a string like this:
family="ABeeZee;100regular" decoration="" style="normal" txtalign="txt-left" size="14px" line="22px" padding="0px" bold="" uppercase="" color="""
And I want just to get the value/string inside family
:
ABeeZee;100regular
I know that I need to use regex but I still don't understand how to write the pattern...
I tried this without success:
$mystring = 'family="ABeeZee;100regular" decoration="" style="normal" txtalign="txt-left" size="14px" line="22px" padding="0px" bold="" uppercase="" color=""" '
$pattern = '/(family)="([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)"/is';
$string = preg_replace($pattern, "", $mystring);