How do you print a string after it's been searched for an RE?
John Salerno
johnjsal at gmail.com
Thu Jun 23 18:02:34 EDT 2011
On Jun 23, 4:47 pm, "Thomas L. Shinnick" <tshin... at prismnet.com>
wrote:
> There is also
> print(match_obj.string)
> which gives you a copy of the string searched. See end of section
> 6.2.5. Match Objects
I tried that, but the only time I wanted the string printed was when
there *wasn't* a match, so the match object was a NoneType.
More information about the Python-list
mailing list