A word boundary \b
works only with characters that are in \w
character class, i.e [0-9a-zA-Z_]
, thus you can't put a \b
after an accentued character like à
.
You can solve the problem in your case using a lookahead:
felicità(?=\s|$)
or shorter:
felicità(?!\S)
(or \W
in place of \s
as suggested @Sniffer, but you take the risk to match something like :felicitàà
)