* 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 cont
Igor,
I don't think that is what he wants.
Thomas,
You can use the build in ZnHeaders class from the Zinc HTTP Components
library/framework:
ZnHeaders readFrom: (String crlf join: 'Foo:1
Bar: foo-
bar
Final:true
Foo: another-foo' lines) readStream.
=> a ZnHeaders('Bar'->'foo- bar' 'Final'->
On 27 May 2013 18:42, Thomas Worthington 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:
> j...@null.com" becomes "From" and "j...@null.com") but some header lines are
> long and have been continued
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:
j...@null.com" becomes "From" and "j...@null.com") but some header lines are
long and have been continued by inserting a newline and one or more
spaces. Before s