Public feed
#723394
$ python
Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> raw = '''<?xml version="1.0"?>
<log>
<logentry
revision="0">
<date>2007-10-02T18:16:25.707165Z</date>
<msg>After the colon are a space, 3 bad chars, 3 good chars, and a period: ?\021?\022?\017
.</msg>
</logentry>
</log>'''
... ... ... ... ... ... ... ... >>> raw
'<?xml version="1.0"?>\n<log>\n<logentry\n revision="0">\n<date>2007-10-02T18:16:25.707165Z</date>\n<msg>After the colon are a space, 3 bad chars, 3 good chars, and a period: ?\x11?\x12?\x0f\t\n .</msg>\n</logentry>\n</log>'
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match(".*", raw)
<_sre.SRE_Match object at 0xb7cccdb0>
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: .*", raw)
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period.*", raw)
>>> re.match(".*After .*", raw)
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match(".*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match(".*After.*", raw)
>>> re.match(".*fter.*", raw)
>>> re.match(".*fter", raw)
>>> re.match(".*fter.*$", raw)
>>> re.match(".*fter.+", raw)
>>> re.match(".*", raw)
<_sre.SRE_Match object at 0xb7cdf288>
>>> re.match("After.*", raw)
>>> re.match(".*^After.*", raw)
>>> re.match(".*^After", raw)
>>> re.match("^After", raw)
>>> re.match(".*<log>.*", raw)
>>> re.match(".*log", raw)
>>> re.match(".*log.*", raw)
>>> raw
'<?xml version="1.0"?>\n<log>\n<logentry\n revision="0">\n<date>2007-10-02T18:16:25.707165Z</date>\n<msg>After the colon are a space, 3 bad chars, 3 good chars, and a period: ?\x11?\x12?\x0f\t\n .</msg>\n</logentry>\n</log>'
>>> re.match(".*<\\?xml.*", raw)
<_sre.SRE_Match object at 0xb7cccdb0>
>>> re.match('.*<\\?xml version="1.0"\\?>.*', raw)
<_sre.SRE_Match object at 0xb7cdf330>
>>> re.match('.*<\\?xml version="1.0"\\?>\n.*', raw)
<_sre.SRE_Match object at 0xb7cdf368>
>>> re.match('.*<\\?xml version="1.0"\\?>\n<log>.*', raw)
<_sre.SRE_Match object at 0xb7cdf330>
>>> re.match('.*<\\?xml version="1.0"\\?>.*', raw)
<_sre.SRE_Match object at 0xb7cdf3a0>
>>> re.match('.*<\\?xml version="1.0"\\?>.*<log>', raw)
>>> re.match("[\n.]*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match("(\n|.)*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\..*", raw)
>>> re.match("(\n|.)*After the colon are a space, 3 bad chars, 3 good chars, and a period: \\?\\\\021\\?\\\\022\\?\\\\017 \n\\&\\#13;\\.(\n|.)*", raw)
>>> re.match("\*\\?\\\\021\\?\\\\022\\?\\\\017.*", raw)
>>> re.match(".*\\?\\\\021\\?\\\\022\\?\\\\017.*", raw)
>>> re.match(".*\\?\\\\021\\?\\\\022\\?\\\\017.*", raw)