Re: [opensuse] regexp -- defference between \< and \b ?
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 06:53:47 -0700
On Tuesday 29 April 2008 21:53, David C. Rankin wrote:
Randall R Schulz wrote:
On Tuesday 29 April 2008 17:58, David C. Rankin wrote:
Listmates:
With regular expressions, what is the difference between \< and
\b ? The man page says:
Which man page? ...
Actually it comes from man grep. Specifically:
The Backslash Character and Special Expressions
The symbols \< and \> respectively match the empty string at
the beginning and end of a word. The symbol \b matches the empty
string at the edge of a word, ...
I guess it's been a long time since I've read the man page for the grep
family. I didn't realize \b and \B were a part of Gnu grep.
end. Boundaries are either. (Am I going too fast for you??)
Trying to digest BRE (basic RE), ERE (extended RE) and ARE (Advanced
RE) in a couple of readings itself moves too fast for me ;-)
Personally, I prefer the old-style \< and \> but apparently they're
a thing of the past.
I know that the Java standard library RE patterns don't have \< and \>,
and apart from egrep and sed, most of the time I enter a regular
expression it's in a Java application (or code) that uses those library
classes, so I have to use \b.
Thanks for your help Randall!
Sure. I learned something, too.
--
David C. Rankin
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- References:
- [opensuse] regexp -- defference between \< and \b ?
- From: David C. Rankin
- Re: [opensuse] regexp -- defference between \< and \b ?
- From: Randall R Schulz
- Re: [opensuse] regexp -- defference between \< and \b ?
- From: David C. Rankin
- [opensuse] regexp -- defference between \< and \b ?
- Prev by Date: Re: [opensuse] TV Capture
- Next by Date: Re: [opensuse] TV Capture
- Previous by thread: Re: [opensuse] regexp -- defference between \< and \b ?
- Next by thread: [opensuse] Printing questions
- Index(es):
Relevant Pages
|