yanjchan Posted June 19, 2009 Share Posted June 19, 2009 This is less of a IMAP question (I've got that up and running) and more of a question on how to parse such messages. I suck at creating scripts to parse texts, and I have no idea on how to do this. The output is sort of like this: 1) A [date] [title] Or at least thats how I remember it... And its all in plain text. Can someone concoct something to seperate them from each other? Thanks! Link to comment https://forums.phpfreaks.com/topic/162840-parsing-emails-through-imap-regex/ Share on other sites More sharing options...
RussellReal Posted June 19, 2009 Share Posted June 19, 2009 preg_match_all("/\) ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+)/",$data,$matches); Link to comment https://forums.phpfreaks.com/topic/162840-parsing-emails-through-imap-regex/#findComment-859291 Share on other sites More sharing options...
yanjchan Posted June 19, 2009 Author Share Posted June 19, 2009 Thanks for your succinct solution. Link to comment https://forums.phpfreaks.com/topic/162840-parsing-emails-through-imap-regex/#findComment-859312 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.