On Tue, 5 Feb 2002, Shawn wrote:
> In a regex, the '\b' can stand for:
> 1) a boundry between a word and non-word char
> 2) bakcspace
\b can be used inside of [] (as part of a character class) to mean a
backspace, but outside, \b always means 'word boundary assertion'. If you
don't want to use a character class, you can put your \b (backspace) into
a double-quoted string:
my $pattern = "Helll\bo";
if(/$pattern/) ...
Which is different from /Helll\bo/, where the word boundary assertion
(which is zero-length) comes into play. You can also use \010 (octal 8)
to match the ASCII backspace character.
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
It is not doing the thing we like to do, but liking the thing we have to do,
that makes life blessed.
-- Goethe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]