On 6 October 2013 23:01, Russell Coker <[email protected]> wrote:
> Does anyone know of a good free library for parsing email addresses?
> Preferrably something that's already packaged for Debian.
>
> I want to have a library sort out the local part, the domain, and the comment
> of an email address.
>
> I've just discovered a bug in a program which does this.  The fact that the
> program in question has been running for many years (last update was over a
> year ago and the code in question wasn't changed for some time before that)
> and processed probably hundreds of thousands of messages without the bug being
> noticed demonstrates that it's not so easy to get this right.  It seems likely
> that there may be other bugs after I fix this one.  So I'd rather use a
> library to ensure that it's had wider testing before I use it.

This is from a Perl library, but it's by a good author and essentially
is just a bunch of regexes, with some logic around it, so should be
possible to port to C.

http://cpansearch.perl.org/src/RJBS/Email-Address-1.900/lib/Email/Address.pm

or you could embed a Perl interpreter and just run the module directly from C.
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to