[Imap-protocol] [SORT EXTENSION] Base-Subject extraction

Michael M Slusarz slusarz at curecanti.org
Tue Jun 7 09:13:23 PDT 2011

Quoting Norman Maurer <norman.maurer at googlemail.com>:

> Hi Michael,


> can you explain me why this should be right:


>> And this subject:


>> "Re: re:re: fwd:[fwd: \t Test] (fwd) (fwd)(fwd) "


>> Should resolve into the string:


>> "\t Test"


> I thought tabs get replaced by space ?

Ummm.... I can't provide an explanation. Because I am flat out wrong.
Right there in the first Base Subject rule (5256 [2.1]): "Convert
all tabs and continuations to space." For some reason, my whitespace
matching regex was matching on word boundaries instead of just
matching tabs, continuations, and spaces wherever they occur in the

So it should instead be:

"Re: re:re: fwd:[fwd: \t Test] (fwd) (fwd)(fwd) "

Resolving into the string:


This is called bug fixing by embarrassment.


More information about the Imap-protocol mailing list