MBOX-Line: From slusarz at curecanti.org  Tue Jun  7 09:13:23 2011
To: imap-protocol@u.washington.edu
From: Michael M Slusarz <slusarz@curecanti.org>
Date: Fri Jun  8 12:34:46 2018
Subject: [Imap-protocol] [SORT EXTENSION] Base-Subject extraction
In-Reply-To: <BANLkTikcnT-S+qFdBddwyq1bjLnx3N45Zg@mail.gmail.com>
References: <BANLkTimaQZXif-G33pjCdVuNzNHs8cjr=Q@mail.gmail.com>
	<20110607003321.Horde.7akgDoF5lbhN7cYxm91GKuA@bigworm.curecanti.org>
	<BANLkTikcnT-S+qFdBddwyq1bjLnx3N45Zg@mail.gmail.com>
Message-ID: <20110607101323.Horde.eflQDYF5lbhN7k4jzkYXvOA@bigworm.curecanti.org>

Quoting Norman Maurer <norman.maurer@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  
string.

So it should instead be:

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

Resolving into the string:

    "Test"

This is called bug fixing by embarrassment.

michael


