Article View: news.software.readers
Article #70915Re: Interesting regexp question
From: Tom B.
Date: Sun, 21 Jan 2001 03:16
Date: Sun, 21 Jan 2001 03:16
20 lines
1813 bytes
1813 bytes
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. -- Tom B. * * * Gravity Pages * * * http://www.naplesfl.net/~tbates/gravity/
Technical Details
Message-ID:
<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!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!cyclone.tampabay.rr.com!newsfeed.se.mediaone.net!typhoon.jacksonville.mediaone.net.POSTED!not-for-mailReferences:
<902F9170Farerayiocom@24.28.95.186>Show Full Headers
Complete Article Headers
Message-ID: <MPG.14d41ebc8ea7cb4b989750@news.se.mediaone.net> Subject: Re: Interesting regexp question Date: Sun, 21 Jan 2001 03:16:41 GMT From: Tom B. <nfn03862@naples.net> References: <902F9170Farerayiocom@24.28.95.186> 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!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!cyclone.tampabay.rr.com!newsfeed.se.mediaone.net!typhoon.jacksonville.mediaone.net.POSTED!not-for-mail Newsgroups: news.software.readers Organization: tbates X-Newsreader: MicroPlanet Gravity v2.50 Lines: 19 NNTP-Posting-Host: 24.129.24.104 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.jacksonville.mediaone.net 980047001 24.129.24.104 (Sat, 20 Jan 2001 22:16:41 EST) NNTP-Posting-Date: Sat, 20 Jan 2001 22:16:41 EST