0

I have:

import re
p = re.compile("This is (.*)")
s = '''
This is my
multiline string'''
r = re.search(p, s)
r.group(1)

and unfortunately the result is "my" instead of all the text after "is ". What should I change?

khelwood
  • 52,115
  • 13
  • 74
  • 94
Gregory
  • 3
  • 2

0 Answers0