Parsing and splitting textfile

Steven Schveighoffer schveiguy at yahoo.com
Mon Feb 24 11:00:09 PST 2014


On Mon, 24 Feb 2014 13:52:45 -0500, Hugo Florentino <hugo at acdam.cu> wrote:

> Hello,
>
> Can you point me to an efficient way to parse a text file and split it  
> by certain expression (for example, `\n\nFrom\ .+ at .+$`), copying what  
> has already been read to a separate file, and so on till the end of the  
> file?
>
> I am trying to implement a mailbox to maildir format conversion  
> application in D, but I would like to avoid loading each mbox completely  
> into memory.
>
> Regards, Hugo

std.regex

-Steve


More information about the Digitalmars-d-learn mailing list