diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2017-01-18 21:51:12 +0100 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2017-01-25 20:31:17 +0100 |
commit | 30604d9bcd2ced4f0b7c8602c262eda1ceb8046a (patch) | |
tree | b61d30fe3ae34570f8ac15334c5419c04c9b7ef0 | |
parent | 04135531efdc9d440d29c55a5a4d51a8abbbf4e4 (diff) |
Further improve pointer regex
Properly escape with r-string.
Only match pointer values surrounded by word boundaries
-rwxr-xr-x | scrub-logs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scrub-logs.py b/scrub-logs.py index da1991b..60a6178 100755 --- a/scrub-logs.py +++ b/scrub-logs.py @@ -26,7 +26,7 @@ def strip_path_prefix(line): def strip_addrs(line): - line = re.sub('\s(0x)?[0-9A-Fa-f]{6,16}', '', line) + line = re.sub(r'\b(0x)?[0-9A-Fa-f]{6,16}\b', '', line) return line |