match pattern

Diez B. Roggisch deets at web.de
Mon Sep 20 16:40:58 EDT 2010


rudikk00 <rudikk99 at yahoo.com> writes:


> I remember perl has a match function =~/H/ --> which searches if there
> is "H" pattern in line. Is there a reasonable analog of it in python?

It's called a regular expression, which can be matched or searched in a
string. Take a look at the module "re" in python.

  http://docs.python.org/library/re.html

Diez



More information about the Python-list mailing list