[Tutor] Regular expressions question

Ed Owens eowens0124 at gmx.com
Thu Dec 6 01:13:22 CET 2012


 >>> str(string)
'[<div class="wx-timestamp">\n<div class="wx-subtitle 
wx-timestamp">Updated: Dec 5, 2012, 5:08pm EST</div>\n</div>]'
 >>> m = re.search('":\b(\w+\s+\d+,\s+\d+,\s+\d+:\d+.m\s+\w+)<', 
str(string))
 >>> print m
None
 >>>

I'm sort of embarrassed to ask this, but I've been staring at this 
regular expression for hours and can't see why it doesn't work.  I'm 
trying to recover the date string from the string, with no success.

Thanks in advance for the help.

Ed


More information about the Tutor mailing list