Article View: news.software.readers
Article #71429Re: Interesting regexp question
From: Csaba Raduly
Date: Thu, 01 Feb 2001 10:30
Date: Thu, 01 Feb 2001 10:30
33 lines
2287 bytes
2287 bytes
And so it came to pass that Tom B. <nfn03862@naples.net> on 21 Jan
2001 wrote <MPG.14d41ebc8ea7cb4b989750@news.se.mediaone.net>:
>Rocket Ray wrote ...
>
>> Okay, let's say there's someone who sometimes posts as "John
>> Smith", and sometimes posts as "Smith, John", and you want to make
>> a score file entry to do something with his posts. Would you have
>> to just make two entries, or can someone think of a single regular
>> expression that would catch both?
>
>With most REs you should be able to use the OR operator (the pipe or
>vertical slash) something like this.
>
>(John Smith)|(Smith, John)
>
>The only tweaking should be any case considerations and the correct
>number of spaces. You could get fancier, but there is probably no
>need to, if you know exactly how the "from" appears in both cases.
>
Score:: 3.1415926535
From: John Smith
From: Smith, John
% :: is OR
% : is AND
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
You are in a maze of twisted little minds, all different.
Technical Details
Message-ID:
<Xns903B65F11quuxi@194.203.134.135>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!158.43.192.22!join.news.pipex.net!pipex!tank.news.pipex.net!pipex!warm.news.pipex.net!pipex!forties.sophos.com!sophos.com!not-for-mailReferences:
<902F9170Farerayiocom@24.28.95.186> <MPG.14d41ebc8ea7cb4b989750@news.se.mediaone.net>Show Full Headers
Complete Article Headers
Message-ID: <Xns903B65F11quuxi@194.203.134.135> Subject: Re: Interesting regexp question Date: Thu, 01 Feb 2001 10:30:42 +0000 From: real.email@signature.this.is.invalid (Csaba Raduly) References: <902F9170Farerayiocom@24.28.95.186> <MPG.14d41ebc8ea7cb4b989750@news.se.mediaone.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!158.43.192.22!join.news.pipex.net!pipex!tank.news.pipex.net!pipex!warm.news.pipex.net!pipex!forties.sophos.com!sophos.com!not-for-mail Newsgroups: news.software.readers Organization: SOPHOS Plc Lines: 32 Approved: The Authentic Approver NNTP-Posting-Host: tunnel.sophos.com X-Trace: forties.sophos.com 981023442 24883 194.203.134.240 (1 Feb 2001 10:30:42 GMT) X-Complaints-To: abuse@sophos.com NNTP-Posting-Date: Thu, 1 Feb 2001 10:30:42 +0000 (UTC) User-Agent: Xnews/03.11.14 X-Led-Zeppelin: Rulez ! Mail-Copies-To: Never