📌  相关文章
📜  在两个正则表达式 python 代码示例之间替换字符串

📅  最后修改于: 2022-03-11 14:46:01.744000             🧑  作者: Mango

代码示例1
a = r''' Example
This is a very annoying string
that takes up multiple lines
and h@s a// kind{s} of stupid symbols in it
ok String'''

import re
re.sub('\nThis.*?ok','',a, flags=re.DOTALL)
' Example String'