On Sun, May 29, 2016 at 12:00 PM, Jeff Fisher <jeffenst...@gmail.com> wrote: > Hello Xu, > > Le 29.05.2016 08:33, Xu Wang a écrit : >> Dear all, >> >> When I send a message, it is appended to a big file called ~/sent. I >> would like to get the last email in that big file. I'm trying to >> understand the format. I thought I could just get everything starting >> with From:. But if there is a line in the body that starts with >> 'From:", the F is not escaped like I have seen it before. So my regex >> would match that. > > If you're looking for the start of messages, you should be searching for > lines starting with "From ", including the trailing space. Lines > starting with "From:" do not delimit messages in mbox format, but lines > starting with "From " in the body of a message should be escaped. > > Hope this helps. > > Best Regards, > Jeff
Thank you, Jeff. I indeed missed this important detail! Kind regards, Xu