这是在编程模式下
import re
w2=r'u[^wr]q'
print(re.findall(w2,'uiq usq uwq'))
结果是
[]
然后在交互模式下
>>> w2=r'u[^wr]q'
>>> print(re.findall(w2,'uiq usq uwq'))
['uiq', 'usq']
请问为什么在交互模式下行得通,在编程模式下却行不通呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
问题无法重现