in reply to Re: Regular Expressions
in thread Regular Expressions \b and \B

Okay, I get that, how about \B?
--
paul

Replies are listed 'Best First'.
Re: Re: Re: Regular Expressions
by nysus (Parson) on Jun 27, 2001 at 08:46 UTC
    If \b matches an invisible area between a word and a non-word character, \B matches the invisible spaces that are between two word characters OR between two non-word characters.

    For instance, /f\B./ matches "fr" but it does not match "f@" because the invisible space between 'f' and '@' is a word boundary and we are looking for invisible spaces that are not word boundaries. Similary /@\B./ would match "@}" but it would not match "@A".

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot";
    $nysus = $PM . $MCF;