8.4 【插件神器 04】正则表达式测试:Regex Tester¶

Regex Tester是PyCharm的第三方插件,可以测试正则表达式。
按照下图入口,安装 Regex Tester 插件:

安装完成后,无需重启 PyCharm ,点击 PyCharm 界面左下方的小矩形按钮,就能找到 Regex Tester 选项。

点击进入后,就出现了如下界面。我随手写了个匹配手机号码的正则(不一定准确),匹配到的字符串背景会被高亮。右上方还有一些选项如大小写敏感,多行模式等,可根据需要进行选择。Regex Tester 还提供了Split,Replace功能等。
使用效果如下:
