Python 正则表达式:为什么这不起作用? [英] Python Regular Expression: why does this not work?
本文介绍了Python 正则表达式:为什么这不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这不会给我错误或答案.
This does not give me an error nor an answer.
re.sub('\\.(\\W|\\.)*[o0](\\W|[o0])*', '*', '..........................................')
为什么会这样?另外,如果我减少周期"的数量,那么它会起作用.
Why does it behave like so? Also, if I reduce the amount of 'periods', then it works.
谢谢.
推荐答案
你有 灾难性的回溯.
这篇关于Python 正则表达式:为什么这不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文