How to print all expressions that match a regular expression

Ben Finney ben+python at
Sat Feb 6 23:43:23 CET 2010

Roy Smith <roy at> writes:

>  "hzhuo1 at" <hzhuo1 at> wrote:
> > What I need is that given a particular regular expression, output
> > all the matches.

> Please enumerate all the strings which match ".*". Use additional
> sheets of paper if needed.


 \     “Are you pondering what I'm pondering?” “I think so, ... Brain, |
  `\    but how can we get seven dwarves to shave their legs?” —_Pinky |
_o__)                                                   and The Brain_ |
Ben Finney

More information about the Python-list mailing list