[\b] in Java regular expression

Within the context of a regular expression \b does not mean backspace;

it means 'word boundary'.


The metacharacter \b is an anchor like the caret and the dollar sign.

It matches at a position that is called a "word boundary". This match

is zero-length.

\B is the negated version of \b. \B matches at every position where \b

does not. Effectively, \B matches at any position between two word

characters as well as at any position between two non-word characters.


Popular posts from this blog

Check MySQL query history from command line

Installing chocolatey on Windows

Fixed: ImportError: No module named utilities.common.tools