相关疑难解决方法(0)

DeprecationWarning:无效的转义序列 - 使用什么而不是\ d?

re在Python 3.6.5中遇到了模块问题.我的正则表达式中有这种模式:

'\\nRevision: (\d+)\\n'
Run Code Online (Sandbox Code Playgroud)

但是当我运行它时,我得到了一个DeprecationWarning.

在SO上搜索了这个问题,但实际上还没有找到答案 - 我应该用什么而不是\d+?只是[0-9]+或者别的什么?

python regex python-3.x

56
推荐指数
2
解决办法
3万
查看次数

标签 统计

python ×1

python-3.x ×1

regex ×1