Article View: news.software.readers
Article #235462Re: ARG!!!! \b again...
From: JimH
Date: Mon, 14 Sep 2009 09:55
Date: Mon, 14 Sep 2009 09:55
52 lines
3507 bytes
3507 bytes
Mike Dee <mikedee@emteedee.invalid> wrote in news:pan.2009.09.14.02.24.35.205908@emteedee.invalid: > 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. > Ah, ok I see what you're saying. I did mean score on the subpattern alone. It would be nice if there was some way it could do a "partial score" to give me some idea how well it matched. Oh well, dreams are easy and free. :) I've got a text editor (and a file renamer too - which is handy) that can use regexps, but until I verify a candidate as working in XNews, I keep it in my mental "unconfirmed" bin. This menu option will allow that bin to keep from growing too large (at my age, that's always a plus).
Technical Details
Message-ID:
<Xns9C863C1F06EA9hahadotdotdot@74.209.136.98>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!xlned.com!feeder3.xlned.com!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news6References:
<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> <pan.2009.09.14.02.24.35.205908@emteedee.invalid>Show Full Headers
Complete Article Headers
Message-ID: <Xns9C863C1F06EA9hahadotdotdot@74.209.136.98> Subject: Re: ARG!!!! \b again... Date: Mon, 14 Sep 2009 09:55:11 +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> <Xns9C8568DEE88B1hahadotdotdot@74.209.136.91> <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.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news6 Newsgroups: news.software.readers Organization: NewsGuy - Unlimited Usenet $19.95 Lines: 52 NNTP-Posting-Host: pdd2489450732b57f7b2d2a27a4f0ff163c6b38949ccfcda2.newsdawg.com User-Agent: Xnews/5.04.25