pw_presubmit: Handle banned words with underscores

Handle underscores around banned words. Before this CL "${BANNED}" was
blocked but "_${BANNED}_" was not.

Change-Id: Ieb4f6578036930a33669cf11007a245b7c89b751
Bug: 386
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46342
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/banned_words.py b/pw_presubmit/py/pw_presubmit/banned_words.py
index eae763b..f0812ac 100644
--- a/pw_presubmit/py/pw_presubmit/banned_words.py
+++ b/pw_presubmit/py/pw_presubmit/banned_words.py
@@ -66,7 +66,7 @@
         _ = re.compile(word)
 
     return re.compile(
-        r"\b({})(\b|e?[sd]\b)".format('|'.join(all_words)),
+        r"(\b|_)({})(\b|_|e?[sd]_?\b)".format('|'.join(all_words)),
         re.IGNORECASE,
     )