RE Module Question.

Paul Winkler slinkp23 at yahoo.com
Tue Nov 6 06:49:38 CET 2001


On Mon, 5 Nov 2001 23:50:13 -0500, Adonis Vargas
<deltapigz at telocity.com> wrote:
>test = "this is a test"
>if "test" in test: print "found string."
>
>this is just pseudocode to get the concept im trying to achieve.

We just had a thread on this a few days ago... try the archives at
groups.google.com.

You can do it like so:

test = "this is spam"
if test.find("spam"): print "found it"

Also, look at 
http://www.vex.net/parnassus/apyllo.py?i=83093702
for a nice alternative to regular expressions.




More information about the Python-list mailing list