Why in this case left \b
performs as left \B
?
\b\$[0-9]+(\.[0-9][0-9])?\b
This pattern should omit phrases such a$99.99
because of performance of left \b
.
\b
detects phrases which have not been bounded with letters, digits or underscore. But not! I examined it in regex101.
as you see it detects phrases such tyh666.8
but doesn't detect $99
However, right \b
performs completely correctly!
Surprisingly, I changed it to left \B
it worked!
\B
detects phrases which have been bounded with letters, digits or underscore. But here it works as a left \b
!
and I have no idea why?!
As you see it detects phrases which have not been bounded with letters, digits or underscore