🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #74227

Re: Renaming a newsgroup

#74227
From: Dr.Ruud
Date: Mon, 11 Sep 2006 20:36
32 lines
2106 bytes
John F. Morse schreef:
> Dr.Ruud:

>> [s/$src/$dst/g]
>>
>>  s/\Q$src/$dst/g
>>
>> The \Q will quote all non-word-characters, see perlre and perlop and
>> quotemeta().
>
> I presume you include the period (the first character, just before
> the ? mark above)? My eyes aren't that good -- maybe it is a comma?
>
> If it is a period, I have successfully renamed groups from
> local.announcement and local.test to xanadu.announce and xanadu.test
> using Jeff's "s/$src/$dst/g" example.
>
> I don't pretend to know anything about Perl (wish I did), but I just
> wanted to let you know of my test results.

Why run a risk when there is no need to?

Yes, the dot is one of the characters that gets escaped, so that it
doesn't mean 'any character' anymore. This often won't change the
result, because a dot also matches a dot. So you need better tests.:)

-- 
Affijn, Ruud

"Gewoon is een tijger."

Technical Details
Message-ID: <ee67fo.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!postnews.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
References: <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net> <ee42fj.188.1@news.isolution.nl> <IdfNg.106807$5i3.64730@bgtnsc04-news.ops.worldnet.att.net>

Show Full Headers
Complete Article Headers
Message-ID: <ee67fo.100.1@news.isolution.nl>
Subject: Re: Renaming a newsgroup
Date: Mon, 11 Sep 2006 22:36:29 +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> <IdfNg.106807$5i3.64730@bgtnsc04-news.ops.worldnet.att.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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!transit.news.xs4all.nl!xs4all!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: 32
NNTP-Posting-Host: 194.109.13.140
X-Trace: 1158055206 news.xs4all.nl 4522 [::ffff:194.109.13.140]:1155
X-Complaints-To: abuse@xs4all.nl