🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #235442

Re: [xnews] \b use

#235442
From: »Q«
Date: Sat, 12 Sep 2009 14:07
33 lines
2576 bytes
In <news:Xns9C844E800540Fhahadotdotdot@74.209.136.98>,
JimH <nvm@nunya.biz> wrote:

> I'm curious....
> 
> Let's say I'm looking for a subject line that would consist of two
> strings, "first text" and "second text". I can be absolutely certain
> that there will be at least one word boundary between them, and it's
> extremely likely there will be many more than that.
> 
> Would the following regexp work in the cases where there are two or
> more word boundaries between the two strings?
> 
> \bfirst text\b\bsecond text\b

No.  \b\b matches the same things \b does

> If not, any suggestions?
> 
> (Basically, I'm looking to completely ignore anything between the two 
> strings)

stringone.*\b.*stringtwo

.*\b.* matches any number of characters between the two strings as long
as there is at least one word boundary among them.

FWIW, <http://xnews.remarqs.net/score.htm> has links to a few regular
expression sites I thought were useful.  In particular, for learning
about them and playing with them, the last two links are great, the
tutorials and The Regex Coach.  (The Regex Coach uses its own regex
engine, but it's designed to be Perl-compatible, so it mostly agrees
with Xnews' regexes.)
Technical Details
Message-ID: <20090912090739.12529362@bellgrove.remarqs.net>
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!feeder.erje.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <Xns9C7ECBDA4BECAammammatatiscalineti@194.177.97.96> <Xns9C7ECF92E972Chahadotdotdot@74.209.136.98> <Xns9C818F65AE920emteedee@87.106.137.111> <Xns9C81395E0DB70hahadotdotdot@74.209.136.94> <Xns9C8378CF1712Aemteedee@87.106.137.111> <Xns9C836157A806Chahadotdotdot@74.209.136.81> <Xns9C84D8825B0B9emteedee@87.106.137.111> <Xns9C844E800540Fhahadotdotdot@74.209.136.98>

Show Full Headers
Complete Article Headers
Message-ID: <20090912090739.12529362@bellgrove.remarqs.net>
Subject: Re: [xnews] \b use
Date: Sat, 12 Sep 2009 09:07:39 -0500
From: »Q« <boxcars@gmx.net>
References: <Xns9C7ECBDA4BECAammammatatiscalineti@194.177.97.96> <Xns9C7ECF92E972Chahadotdotdot@74.209.136.98> <Xns9C818F65AE920emteedee@87.106.137.111> <Xns9C81395E0DB70hahadotdotdot@74.209.136.94> <Xns9C8378CF1712Aemteedee@87.106.137.111> <Xns9C836157A806Chahadotdotdot@74.209.136.81> <Xns9C84D8825B0B9emteedee@87.106.137.111> <Xns9C844E800540Fhahadotdotdot@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!feeder.erje.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Organization: none
Lines: 33
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Trace: individual.net BbU/ROlHbZ3rzaUagdxUNwA034mAHlYM5g3tCJtwNDv4B7xvy6
X-Orig-Path: bellgrove.remarqs.net!not-for-mail
Cancel-Lock: sha1:AIeaa+Cy6vJItLaIYlCwiX5t+XM=
X-Newsreader: Claws Mail 3.7.2 (GTK+ 2.14.7; i686-pc-linux-gnu)