Aaron Stone wrote: > On Wed, Apr 27, 2005, Paul J Stevens <[EMAIL PROTECTED]> said: > > >>Hi guys, >> >>I'm exploring the usage of regexp?|pcre calls in dbmail. I'm working on >>the fast threading code, but it'll come in handy in many other areas I >>suspect. > > > I'm not sure I understand the purpose of the regex library. For parsing > certain headers? This makes sense for some of the more convoluted headers.
No. It is pretty much required for getting at the base-subject as required for SORT and THREAD (draft-ietf-imapext-sort-17). > I'd say that PCRE is the way to go. I spent all day yesterday trying to build a rather complicated pattern with regex. No good. With pcre, it's a breeze ... once you get the hang of the api :-) I just wrote a little ditty called dm_pcre_split (heh, like php). Stuff like that will be very useful in the imap command parser, without having to resort to a full fledged lex/yacc parser. > Reading back on some Glib mailing lists, they were talking about a regex > library in 1999/2000, but then decided that trying to wrap PCRE was silly > if you can just use PCRE. Right. Very much the answer I was hoping for. -- ________________________________________________________________ Paul Stevens [EMAIL PROTECTED] NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands_______________________________________www.nfg.nl