"Disabling" raw string to print newlines
kuratkull at kuratkull.com
kuratkull at kuratkull.com
Mon May 19 05:54:14 EDT 2008
Hello,
***************
import urllib2
import re
import string
import sys
url = "http://www.macgyver.com/"
request = urllib2.Request(url)
opener = urllib2.build_opener()
html = opener.open(request).read()
match = re.compile("<PRE>(.+)</PRE>", re.DOTALL)
out = match.findall(html)
print out
**************
I would like to print out string with formatting, but as I read, the
string is made into a raw string when using re.
How could I disable or bypass this?
I googled for an hour and couldn't find a solution.
Thank you in advance.
More information about the Python-list
mailing list