[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/3.5/kdepim/akregator/src/librss
From:       Frank Osterfeld <frank.osterfeld () gmx ! de>
Date:       2007-10-27 16:51:45
Message-ID: 200710271851.53298.frank.osterfeld () gmx ! de
[Download RAW message or body]


On Saturday 27 October 2007, you wrote:

> If the parentheses are to be part of the display-name, they have to be
> quoted: "John Sheridan (President ISA)" <john@isa.org>
>
> This is the only thing my kmime code did in fact, completely implement, so
> please use that parser.

Note that this is not email but RSS, where <author> (and similar tags) might 
contain arbitrary strings, not following any standard. This can be anything, 
e.g., often it's just a name or username without email address.
The parser was written to cover the cases found in my test set, and might be 
extended to cover other weird forms if they become common (I've seen e.g. 
e-mail address obfuscation using HTML entities) which aren't mime-compliant 
in any way.

> Oh, and regex'es are not recursive (unless you use Perl6, and then they're
> no longer "regular" expressions), so
>   John Sheridan (President (ISA)) <john@isa.org>
> already breaks your regexp.

That string is parsed as expected: name="John Sheridan (President (ISA))" 
email="john@isa.org".
The original regexp cut off the parentheses from the remaining "(some name)" 
where the original string was e.g. "foo@bar.com (some name)", but also 
cut "Foo (Bar)" to "Bar". 

Frank

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic