Given a string with attribute/value pairs such as
attr1="some text" attr2 = "some other text" attr3= "some weird !@'#$\"=+ text"
the goal is to parse it and output an associative array, in this case:
array('attr1' => 'some text',
'attr2' => 'some other text',
'attr3' => 'some weird !@\'#$\"=+ text')
Note the inconsistent spacing around the equal signs, the escaped double quote in the input, and the escaped single quote in the output.