logoalt Hacker News

CuriouslyCyesterday at 1:21 PM1 replyview on HN

\bfoo\b will produce noisy results. People have been pushing linting rules that force a single consistent choice of string delimiters since at least 2010 when Python went from a cute academic language to a real industry workhorse.


Replies

maratcyesterday at 1:42 PM

> \bfoo\b will produce noisy results.

Add a look-behind for '[' and a look-ahead for ']' and you'll be fine.