stringutil: add function to compile stringmatcher pattern into regexp
Prepares for adding a revset predicate for "grep --diff". The grep logic
needs a regexp object instead of a match function.
[tool.black]
line-length = 80
exclude = '''
build/
| wheelhouse/
| dist/
| packages/
| \.hg/
| \.mypy_cache/
| \.venv/
| mercurial/thirdparty/
'''
skip-string-normalization = true
quiet = true