* Use the regex in Pharo too. Should be more than adequate for what you seek.
* Create your string parsing code, in the lines of what Igor suggests, extending it for multiple line header fields * Use other libraries, like Zinc as Sven suggests, there are others similar in other packages, bit contrived and not really what you seek I presume. On Mon, May 27, 2013 at 10:12 PM, Thomas Worthington < [email protected]> wrote: > I've got a string which is the header section of an email. I have a regex > which will split a header field name from its data (ie, "From: > [email protected]" becomes "From" and "[email protected]") but some header lines are > long and have been continued by inserting a newline and one or more > spaces. Before splitting the fields I need to undo these continuations by > deleting these combinations of a newline followed by some whitespace. > > This would certainly be trivial in Perl or any of the normal Linux regex > engines but I've spent hours on this today, equipped with the PBE2 > chapter, and got nowhere. > > How do I do this in Pharo? > > Thanks, > > Thomas > >
