[2.5] Regex doesn't support MULTILINE?
nospam at nospam.com
Sun Jul 22 04:09:08 CEST 2007
I'm trying to extract information from a web page using the Re module,
but it doesn't seem to support MULTILINE:
#NO CRLF : works
response = "<b>Bla</b>blabla<font color=#123>"
#CRLF : doesn't work
response = "<b>Bla</b>blabla\r\n<font color=#123>"
pattern = "<b>Bla</b>.+?<font color=(.+?)>"
p = re.compile(pattern,re.IGNORECASE|re.MULTILINE)
m = p.search(response)
print "Not found"
Do I need to add something else to have Re work as intended?
More information about the Python-list