Article View: news.software.nntp
Article #74249Re: Renaming a newsgroup
From: Dr.Ruud
Date: Wed, 13 Sep 2006 00:58
Date: Wed, 13 Sep 2006 00:58
28 lines
1955 bytes
1955 bytes
Jeffrey M. Vinocur schreef:
> Dr.Ruud:
>> John F. Morse:
>>> s/$src/$dst/g
>>
>> If $src can contain regex-special characters like .?*+{[^$@
>> then change that substitution to
>>
>> s/\Q$src/$dst/g
>
> That's an excellent point. I guess it depends whether or not we
> want to allow users to make wildcard-based substitutions. I
> think that might actually be useful in this case...hmm.
For wildcard-based substitutions, I guess you need to support capturing
groups and backreferences. But to do both substitutions that John
mentioned in one unambiguous go, you need to know your PCRE:
$src: local\.(announce(?=ment$)|test(?=$)).*$
$dst: xanadu.$1
--
Affijn, Ruud
"Gewoon is een tijger."
Technical Details
Message-ID:
<ee7s87.100.1@news.isolution.nl>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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!transit.news.xs4all.nl!newsgate.cistron.nl!xs4all!transit4.news.xs4all.nl!post.news.xs4all.nl!not-for-mailReferences:
<AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net> <ee42fj.188.1@news.isolution.nl> <ee6g67$k08$2@puck.litech.org>Show Full Headers
Complete Article Headers
Message-ID: <ee7s87.100.1@news.isolution.nl>
Subject: Re: Renaming a newsgroup
Date: Wed, 13 Sep 2006 02:58:50 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
References: <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net> <ee42fj.188.1@news.isolution.nl> <ee6g67$k08$2@puck.litech.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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!transit.news.xs4all.nl!newsgate.cistron.nl!xs4all!transit4.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Newsgroups: news.software.nntp
Organization: Chaos rules.
X-Newsreader: WMDIYB
X-Archive-Me: please
Approved: yesterday
X-Face: &CQ$FIr!=+=w,8`0Q^Ug"1>F[(/op8->E; NQet`5fe$;
=e*!Z5&REvp<~Tj|"Y[|8OcJ{w#z&mB7B:I)XO*%_|\]|YW$C>>$Q[9-#K~c$tQ^Mf0,wMo?h\C)TE>f
Lines: 28
NNTP-Posting-Host: 194.109.13.140
X-Trace: 1158135923 news.xs4all.nl 4523 [::ffff:194.109.13.140]:2213
X-Complaints-To: abuse@xs4all.nl