I was automating remember the milk tasks with zapier which trigger if anything changes in atom feed. The problem is zapier sends xhtml formatted data in plain text which I am catching using php://input
<?php$xhtml = file_get_contents('php://input');?>
The raw data looks like this:
@class: rtm_duespan: [{'#text': 'Due:', '@class': 'rtm_due_title'}, {'#text': 'Sat 16 Jul 16', '@class': 'rtm_due_value'}]@class: rtm_priorityspan: [{'#text': 'Priority:', '@class': 'rtm_priority_title'}, {'#text': '1', '@class': 'rtm_priority_value'}]@class: rtm_tagsspan: [{'#text': 'Tags:', '@class': 'rtm_tags_title'}, {'#text': 'gcal-work, github', '@class': 'rtm_tags_value'}]@class: rtm_locationspan: [{'#text': 'Location:', '@class': 'rtm_location_title'}, {'#text': 'none', '@class': 'rtm_location_value'}]@class: rtm_listspan: [{'#text': 'List:', '@class': 'rtm_list_title'}, {'#text': 'Work', '@class': 'rtm_list_value'}]
Lets say I want to extract the due-date Sat 16 Jul 16 under @class: rtm_due; How can I extract this? Will regex (preg_match
) be any help? If so how?