Answers for "replace string between two regex python"

0

replace string between two regex python

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'
Posted by: Guest on February-25-2021

Code answers related to "replace string between two regex python"

Python Answers by Framework

Browse Popular Code Answers by Language