Fix preg_replace callback function

Removed anonymous function and used the one specified in RetrieveFMXML.