针对你提出的问题“cannot import name 'sre_parse' from 're'”,我将按照提供的提示分点进行回答: 确认错误信息: 错误信息“cannot import name 'sre_parse' from 're'”明确指出了尝试从Python的re模块导入sre_parse时失败了。这通常意味着sre_parse要么不存在于re模块中,要么在当前使用的Python版本中不可用。
pip install exrex 修改exrex.py的代码,直接导入 sre_parse 模块。
PyDelphin currently uses sre_parse.parse_template() for parsing the capturing groups of regular expressions: pydelphin/delphin/repp.py Lines 634 to 636 in 33415cf def _get_segments(replacement: str, _re): # parse_template() is an undocum...
文件夹 里了