🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #235458

Re: ARG!!!! \b again...

#235458
From: Mike Dee
Date: Mon, 14 Sep 2009 02:24
42 lines
3225 bytes
JimH wrote:

> Mike Dee <mikedee@emteedee.invalid> wrote:
> 
[...]
>> That is, go: "Special" menu, "Test Regex" submenu. 
[...]
> 
> I never noticed that option. Thank you for pointing it out.

YW. Its very useful for testing your regex quickly. There are stand-alone
progs for testing regex, which have more features, but Xnews's built-in
one is readily at hand.
 
> I can understand the existence of subpatterns (I've toyed with back 
> references), but XNews can score on them??

If the regex contains a sub-pattern (which must be matched) Xnews has no
choice but to score on them when finding a match, using that regex

It can't score on the sub-pattern alone, if that's what you mean. It takes
the regex given to it to find a matching string, if there is a
sub-pattern in the regex it is inclusive to finding that match.

Using the regex \B_(and|&)_\B again as an example:

the string "this_&_that" will get a match on "_&_" because it matches
both the string "_&_" and the sub-pattern "&". Xnews would not find a
match if all conditions in the regex were not met. All conditions in this
case, are that there must be a matching string on either an "and" or a "&"
sandwiched between two "_"s.

The strings "This & That" or "This and That" or "This_+_That" would not
get a match using the above regex

If you were to write the above regex separately as \B_and_\B and \B_&_\B
there would be no sub-pattern matching involved, you would get a matched
string on "_and_" and "_&_" alone, if those conditions were met.

-- 
dee
Technical Details
Message-ID: <pan.2009.09.14.02.24.35.205908@emteedee.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!weretis.net!feeder1.news.weretis.net!news.solani.org!not-for-mail
References: <Xns9C852D00C2A53hahadotdotdot@74.209.136.97> <Xns9C85D3BE515ADemteedee@87.106.137.111> <Xns9C854F4C319FAhahadotdotdot@74.209.136.98> <Xns9C85E83939B0Cemteedee@87.106.137.111> <Xns9C8568DEE88B1hahadotdotdot@74.209.136.91>

Show Full Headers
Complete Article Headers
Message-ID: <pan.2009.09.14.02.24.35.205908@emteedee.invalid>
Subject: Re: ARG!!!! \b again...
Date: Mon, 14 Sep 2009 12:24:37 +1000
From: Mike Dee <mikedee@emteedee.invalid>
References: <Xns9C852D00C2A53hahadotdotdot@74.209.136.97> <Xns9C85D3BE515ADemteedee@87.106.137.111> <Xns9C854F4C319FAhahadotdotdot@74.209.136.98> <Xns9C85E83939B0Cemteedee@87.106.137.111> <Xns9C8568DEE88B1hahadotdotdot@74.209.136.91>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!weretis.net!feeder1.news.weretis.net!news.solani.org!not-for-mail
Newsgroups: news.software.readers
Organization: Poor Boy
Lines: 42
NNTP-Posting-Host: eJwFwYEBwCAIA7CXQFtg5yjS/09Ywh0enQgGKEplcGRb8C0Ozr61WsMyOUs9k+mYthno3P4iX572DRxT/1V4FiE=
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: solani.org
 eJwVzAcRBEEIBEBLRxiCHFjAv4SvbwENMbLnajDF4VZ1PbycpgchmUJ2yXyXbxyJNkq8HLnAjPq9pUoXrWkyX9+vPa0RvMugo393pxrJUUpPlyzLN3r4a9m9k4myg9nQDL4Slmgf9h+KECvE
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Mon, 14 Sep 2009 02:24:38 +0000 (UTC)
X-Face: $W<X:Uw4$"nTXRHqqZ=.|pFI@K,TNNH0i>-J; N5/yst7]cQb.o^L$oAhs-J!C
 AOUMQ^NHu3aTb9H8awW~4Y.LR`[o}Rz6Xf=^krb-AwUiM"7zA+QR<vWz'8>hKiTOyd]h
 z]7m=[nhuH{NMrE>~][PM`wSKd?TFV-.glh)>N
Cancel-Lock: sha1:AZ6aHzSx+80UppPAfooc063DBy0=
User-Agent: Pan/0.14.2.91 (Linux host, Mac OS, X-server)