$match = array('~(?:face\=[\'"]?(\w+)[\'"]?)~i', '~~i');
$replace = array('font-family:$1;', '<span style="$1">');
I want to replace the old <font> element which has a "face" attribute with a new <span> element with "style" attribute but the regex always fail when the font name in the "face" attribute contains whitespace, e.g : Courier New. How can I modify the regex to solve this problem?