我最初也注意到了不同的写法,但没细究,一直用更简单的 re.search 或 re.match 作小而短的正则匹配。直到刚才看到套娃文章,好像这种讨论方式在前端比较流行:
Python 正则表达式,请不要再用 re.compile 了!!!
https://zhuanlan.zhihu.com/p/70680488
驳 《 Python 正则表达式,请不要再用 re.compile 了!!!》
https://zhuanlan.zhihu.com/p/78265675
回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》
https://zhuanlan.zhihu.com/p/78628786
回《回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》》 Part1
https://zhuanlan.zhihu.com/p/78630410
回《回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》》 Part2
https://zhuanlan.zhihu.com/p/78653548
Python 正则表达式,请不要再用 re.compile 了!!!
https://zhuanlan.zhihu.com/p/70680488
驳 《 Python 正则表达式,请不要再用 re.compile 了!!!》
https://zhuanlan.zhihu.com/p/78265675
回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》
https://zhuanlan.zhihu.com/p/78628786
回《回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》》 Part1
https://zhuanlan.zhihu.com/p/78630410
回《回《驳 <Python 正则表达式,请不要再用 re.compile 了!!!>》》 Part2
https://zhuanlan.zhihu.com/p/78653548