The regex in my regex101 works correctly, but it returns None
in my python script. Can't figure out why.
import re
md = """# Some title here
- Show: Show name here
"""
title = re.search(r'^#\s+(.*)$', md)
show = re.search("(Show: )(.*)$", md)
I have tried adding re.MULTILINE
but it then returns everything after the #
. Can't work out what other flags, if any, I am missing here. It's not only the first re.search
that doesn't work, but any that I try so likely some other flag?