how to remove text between and
using python?
example_text = "This is some text this is some more text."
import re
myre = re.compile("(^.*)(.*$)")
result = myre.match(example_text)
result.groups()
<52> ('This is some text ', ' blah blah blah ', ' this is some more text.')
# Text between
result.group(2)
<56> 'blah blah blah'
# Text outside of
result.group(1)+result.group(3)
<57> 'This is some text this is some more text.'