Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   match pattern (http://www.velocityreviews.com/forums/t733726-match-pattern.html)

rudikk00 09-20-2010 06:58 PM

match pattern
 
Hi all,

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?

thanks!

Alex

Diez B. Roggisch 09-20-2010 08:40 PM

Re: match pattern
 
rudikk00 <rudikk99@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


All times are GMT. The time now is 12:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.