🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #235457

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

#235457
From: JimH
Date: Sun, 13 Sep 2009 14:18
52 lines
2749 bytes
Mike Dee <mikedee@emteedee.invalid> wrote in news:Xns9C85E83939B0Cemteedee@
87.106.137.111:

> JimH wrote:
> 
>> I don't understand why your regexp will match "and". It seems to
>> me that it requires that two underscores appear.
> 
> It won't match "and" without the _and_ being present. To explain:
> 
> I make judicious use of Xnews's built-in regex tool, and perhaps you
> haven't come across it as yet (easy to overlook whats available to
> Xnews). 
> 
> That is, go: "Special" menu, "Test Regex" submenu.
> 
> In the Regex tool dialog that appears; Type in the regex that you
> want to test into the top field labeled, "Pattern". Type the text
> string that you want to test it against in the second field labeled,
> "Test String". Then click the "Match" button. The result will either
> be "Match" or "No Match". If there is a match (meaning, the regex
> works), you will see the results in the lowest field labeled,
> "Matched string and sub-patterns". 
> 
> So if you were to enter into the top field labeled "Pattern":
> 
> \B_(and|&)_\B
> 
> then in the 2nd field labeled "Test String", type:
> 
> this_and_that
> 
> Clicking the "Match" button you would get a match. In the
> lowest field of the dialog you would see it matches the string: 
> 
> _and_
> 
> but it also matches the sub-pattern in the match: "and".
> 
> In this case "and" is a sub-pattern match because of the parenthesis
> surrounding (and|&). If you were scoring on only \B_and_\B then you
> would get a match of only _and_, - there would be no sub-pattern
> "and" to match. 
> 
> HTH.
> 

I never noticed that option. Thank you for pointing it out.

I can understand the existence of subpatterns (I've toyed with back 
references), but XNews can score on them??
Technical Details
Message-ID: <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.ams.giganews.com!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!spln!extra.newsguy.com!newsp.newsguy.com!news1
References: <Xns9C852D00C2A53hahadotdotdot@74.209.136.97> <Xns9C85D3BE515ADemteedee@87.106.137.111> <Xns9C854F4C319FAhahadotdotdot@74.209.136.98> <Xns9C85E83939B0Cemteedee@87.106.137.111>

Show Full Headers
Complete Article Headers
Message-ID: <Xns9C8568DEE88B1hahadotdotdot@74.209.136.91>
Subject: Re: ARG!!!! \b again...
Date: Sun, 13 Sep 2009 14:18:35 +0000
From: JimH <nvm@nunya.biz>
References: <Xns9C852D00C2A53hahadotdotdot@74.209.136.97> <Xns9C85D3BE515ADemteedee@87.106.137.111> <Xns9C854F4C319FAhahadotdotdot@74.209.136.98> <Xns9C85E83939B0Cemteedee@87.106.137.111>
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.ams.giganews.com!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!spln!extra.newsguy.com!newsp.newsguy.com!news1
Newsgroups: news.software.readers
Organization: NewsGuy - Unlimited Usenet $19.95
Lines: 52
NNTP-Posting-Host: p7def97424bf4f09c743dfb8a09c017bc5454af5df542f8f3.newsdawg.com
User-Agent: Xnews/5.04.25