RE Module Question.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue Nov 6 00:09:05 EST 2001
>>>>> "AV" == Adonis Vargas <deltapigz at telocity.com> writes:
AV> test = "this is a test" if "test" in test: print "found
AV> string."
AV> this is just pseudocode to get the concept im trying to
AV> achieve.
In python2.x
>>> test = "this is a test"
>>> if test.find ('test'):
... print "Yes!"
...
Yes!
for python 1.5.x
>>> import string
>>> test = "this is a test"
>>> if string.find (test, 'test'):
... print "Yes!"
...
Yes!
Also, read the regex-howto from here:
http://py-howto.sourceforge.net/regex/regex.html
HTH,
prabhu
More information about the Python-list
mailing list