in reply to Word boundaries
G'day sandyago,
Very briefly, \b matches a word boundary and \B matches NOT a word boundary.
Read "perlrebackslash - Perl Regular Expression Backslash Sequences and Escapes". In particular, the Assertions section of that documentation has a fairly in-depth discussion as well as examples.
Finally, there's quite a few examples of the upper- and lower-case versions having an opposite meaning. For example, \d matches a digit and \D matches NOT a digit; similarly for \s and \S, \w and \W and so on.
— Ken
|
|---|