🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #80659

[Gravity] Regex with european "Umlauts"

#80659
From: Thorsten Kampe
Date: Fri, 22 Jun 2001 00:52
30 lines
2096 bytes
Hi,

I'm trying to setup a "real name" ("First_name Last_name") filter for 
german newsgroups. Some people's software does not encode 8bit 
characters into Quoted Printable, so the name can contain "Umlauts", 
too.

I wrote a first simple regex:
[A-Z][a-z���]+ [A-Z][a-z���]+
and tested it with Tom's "Test Regular Expressions with Javascript" 
page. Fine.

Then I made up a rule that added -100 to all articles with a "From" 
that does not match the regex. I noticed that there were few articles 
that were scored inappropriately. For example:
"From: Sascha Dr�mer" was correctly matched
"From: Sascha F�rber" was incorrectly not matched.

This applied to all names where the /second/ character of first/last 
name was an Umlaut. To find out what's going on I modified the regex 
to:
[A-Z][a-z���]+ [A-Z][a-z�������] ("without the trailing '+'")
"From: Sascha F�rber" was correctly matched!

Of course the two regex should *both* match the "From" string.
Am I missing something obvious or is Gravity's regex implementation 
broken?!

Thorsten
Technical Details
Message-ID: <9gu4t1$b4dmg$1@ID-77524.news.dfncis.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!cs-213.tnt2.s2.uunet.DE!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <9gu4t1$b4dmg$1@ID-77524.news.dfncis.de>
Subject: [Gravity] Regex with european "Umlauts"
Date: Fri, 22 Jun 2001 02:52:50 +0200
From: Thorsten Kampe <thorsten_kampe@web.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!cs-213.tnt2.s2.uunet.DE!not-for-mail
Newsgroups: alt.usenet.offline-reader,news.software.readers
Followup-To: alt.usenet.offline-reader
Lines: 29
NNTP-Posting-Host: cs-213.tnt2.s2.uunet.de (149.225.193.213)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 993171169 11679440 149.225.193.213 (16 [77524])
X-Newsreader: MicroPlanet Gravity v2.50