At 07:46 PM 3/20/2011, Ken D'Ambrosio wrote:
Hey, all -- I know how to match and return stuff from a regex, but I'd
like to do an if, something like (from Perl, sorry):
if (/MatchTextHere/){DoSomething();}
How do I accomplish this in Python?
You say you've done matching and accessing stuff fr
On Mon, 21 Mar 2011 00:46:22 -, Ken D'Ambrosio wrote:
Hey, all -- I know how to match and return stuff from a regex, but I'd
like to do an if, something like (from Perl, sorry):
if (/MatchTextHere/){DoSomething();}
How do I accomplish this in Python?
The basic routine is to do the match
I agree with previous comments.
There are plenty of good tutorials, I have
sometimes found more useful for learning than the manuals.
The manuals are good but I prefer examples.
http://www.tutorialspoint.com/python/python_reg_expressions.htm
http://www.awaretek.com/tutorials.html#regular
Bill Sn
On 3/20/2011 8:46 PM, Ken D'Ambrosio wrote:
Hey, all -- I know how to match and return stuff from a regex, but I'd
like to do an if, something like (from Perl, sorry):
if (/MatchTextHere/){DoSomething();}
How do I accomplish this in Python?
Look at the doc to see what are the possible return
On Sun, Mar 20, 2011 at 8:46 PM, Ken D'Ambrosio wrote:
> Hey, all -- I know how to match and return stuff from a regex, but I'd
> like to do an if, something like (from Perl, sorry):
>
> if (/MatchTextHere/){DoSomething();}
>
> How do I accomplish this in Python?
>
> Thanks!
>
> -Ken
>
Python doe