Article View: news.software.nntp
Article #84109Re: Cleanfeed: Looking for regex expression for ....
From: Ralf Döblitz
Date: Sun, 05 Jun 2011 15:58
Date: Sun, 05 Jun 2011 15:58
45 lines
4055 bytes
4055 bytes
In news.software.nntp D. Stussy <spam+newsgroups@bde-arc.ampr.org> wrote: > "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> wrote in message > news:isbj0q$3uc$1@snarked.org... >> "Steve Crook" <steve@mixmin.net> wrote in message >> news:slrniuhctk.47d.steve@news.mixmin.net... >> > On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in >> > Message-Id: <is9a68$u9p$1@snarked.org>: >> > >> > > My primary questions for posting my regex expression: >> > > 1) Does it do what I think it should? >> > Yes, providing you escape the @, so: /^[^\@:]*$/ >> >> Needing to escape the "@" escaped me! Fixing... ;-) > > Actually, in thinking about perl, does the at-sign need to be escaped here > by a blackslash? Isn't that only needed when it's followed by a letter? man perlvar: | Technical Note on the Syntax of Variable Names |[...] | Perl variable names may also be a sequence of digits or a single | punctuation or control character. These names are all reserved for | special uses by Perl; for example, the all-digits names are used | to hold data captured by backreferences after a regular expression | match. Perl has a special syntax for the single-control-character | names: It understands "^X" (caret "X") to mean the control-"X" | character. For example, the notation $^W (dollar-sign caret "W") | is the scalar variable whose name is the single character | control-"W". This is better than typing a literal control-"W" into | your program. So while today you might get away with not quoting "@:" this might become a special variable in a future release and of course anybody ignoring the reservedness of this name could use in their code, too. Personally, I prefer to always quote expressions like that because you never know when not quoting will bite you after a major perl upgrade. Or do you comlöetely reevaluate and test *all* of your code when a new perl version with at least one incompatible change is released? Defensive coding helps to avoid future problems. Ralf -- "de.alt.comp.kde Die Kommunistische Desktop Erweiterung." – Sven Paulus in <67hu21$43r$1@imperator.oops.sub.de>
Technical Details
Message-ID:
<isg92g$34m$1@selene.doeblitz.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.visyn.net!visyn.net!uucp.gnuu.de!doeblitz.net!.POSTED!not-for-mailReferences:
<is3slt$d30$1@snarked.org> <is6l88$nq1$1@snarked.org> <201106020848.UTC.is7iou$dop$1@tioat.net> <slrniueqnk.47d.steve@news.mixmin.net> <is9a68$u9p$1@snarked.org> <slrniuhctk.47d.steve@news.mixmin.net> <isbj0q$3uc$1@snarked.org> <isbjaj$3us$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <isg92g$34m$1@selene.doeblitz.net>
Subject: Re: Cleanfeed: Looking for regex expression for ....
Date: Sun, 05 Jun 2011 15:58:08 +0000
From: Ralf Döblitz <doeblitz@doeblitz.net>
References: <is3slt$d30$1@snarked.org> <is6l88$nq1$1@snarked.org> <201106020848.UTC.is7iou$dop$1@tioat.net> <slrniueqnk.47d.steve@news.mixmin.net> <is9a68$u9p$1@snarked.org> <slrniuhctk.47d.steve@news.mixmin.net> <isbj0q$3uc$1@snarked.org> <isbjaj$3us$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.visyn.net!visyn.net!uucp.gnuu.de!doeblitz.net!.POSTED!not-for-mail
Newsgroups: news.software.nntp,news.admin.net-abuse.usenet
Organization: private site in Braunschweig, Germany
Lines: 45
NNTP-Posting-Host: selene.escape.de
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: selene.doeblitz.net 1307289488 3222 194.120.234.83 (5 Jun 2011
X-Complaints-To: usenet@selene.doeblitz.net
NNTP-Posting-Date: Sun, 5 Jun 2011 15:58:08 +0000 (UTC)
User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-xen-amd64
(x86_64))
Cancel-Lock: sha1:KS5Gx/6AoBO/RKhSKoFn6x0SArI=
Mail-Copies-To: nobody
X-Face: MTa[OP$pr;
PqMc)e|d9BmnYq|Ir0`Ijj)kNr"C:9lS:bjC1P`Y>eWC41xS,XF96GoZH8WOl
^L#i6KSohA`[`_P->X=Q|g?{H{B):V5>&z"M>njIRGN:5"VBu,OLOe%v6\{@iS
X-Alignment: Lawful Evil
X-No-Archive: Yes
X-Archive: http:/www.netzverwaltung.net/archive/_outgoing/