Article View: news.software.readers
Article #173388Re: [dialog] word boundaries
From: Korbinian Abenthum
Date: Wed, 14 Sep 2005 19:05
Date: Wed, 14 Sep 2005 19:05
29 lines
2159 bytes
2159 bytes
wyzwyz wrote:
> What's the difference between \W and \b ?
Not exactly on topic, but anyway: Have a look into e.g.
http://www.regular-expressions.info/tutorial.html
\W represents a character that is not a word character,
i.e. neither alphanumeric nor the underscore
\b is a wordboundary, i.e. matches if on exactly one side of that marker
is a word character.
The main difference in your example is that \b matches at the beginning or
the end of the text, too, whereas \W needs a character to match. That's why
> +1 subject {\Wabc\W}
doesn't match
> 2 abc:
> 2 abc: test
> 2 test abc
HTH
--
"For that I thank you, but for nothing else. Kill me and be done with it.
You are no Lord of mine" (Rickard Karstark)
Technical Details
Message-ID:
<140905.210510.nsr.50@news.abenthum.de>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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!news.net.uni-c.dk!dotsrc.org!news.dotsrc.org!not-for-mailReferences:
<43285033$0$12681$5a62ac22@per-qv1-newsreader-01.iinet.net.au>Show Full Headers
Complete Article Headers
Message-ID: <140905.210510.nsr.50@news.abenthum.de>
Subject: Re: [dialog] word boundaries
Date: Wed, 14 Sep 2005 21:05:10 +0200
From: Korbinian Abenthum <korbinian@gmx.de>
References: <43285033$0$12681$5a62ac22@per-qv1-newsreader-01.iinet.net.au>
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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!news.net.uni-c.dk!dotsrc.org!news.dotsrc.org!not-for-mail
X-Now-Playing: piero piccioni - traffic boom
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.35 Hamster/2.0.7.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Face: &[gF$*:|'M7pwKut]{LOz!&65BT96:Wn\M"V6Qa#q%~9^z8XhJfmh?.)VB{,
p]Z`6q@e()!g1ghrG7.atG.DXfzulkKE%u~|D7?e6^-yN4GvZJuvz%$LZBA6`dJTo,
MYUO%I*0us[.v/AT,
Lines: 29
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 217.250.2.241
X-Trace: news.sunsite.dk DXC==IZgc7gMO=Mc8biIGL=c`GYSB=nbEKnkKiFJS01?NW=@=8;
LP`]<H5F1iAjoL\i^9Ok[QR184; _bH3h7Uh4J\M[Dd^G766HIC6CaBVbO5?ZlPJ
X-Complaints-To: staff@sunsite.dk