Python `regex` 库:你所不知道的正则表达式用法Python 标准库的 re 模块稳定、够用,但它的语法和引擎能力长期停留在相对保守的范围内。第三方 regex 库的设计目标很明确:API 与 re 向后兼容,同时提供 re 缺失的大量特性。PyPI 页面的第一句话就是:“This regex implementation is backwards-compatible with the standard ‘re’ module, but offers additional functionality.”