I could use some help writing a regular expression for this dictionary string (I don’t use them all that often).
This is an example of the string dictionary:
O:8:"stdClass":5:{s:4:"sent";i:0;s:6:"graded";i:0;s:5:"score";i:0;s:6:"answer";s:14:"<p>Johnson</p>";s:8:"response";s:0:"";}
I want to extract Johnson from the string dictionary.
Any help would be appreciated, thanks.
This is a PHP serialized object. Don’t use a regular expression.
unserialize()the data and display theanswerproperty accordingly.