Searching for a piece of string

S

saif.shakeel

Hi,
How can i match a part of string and branch to some part of code.
Ex If there is a string like "Timeout" and i want to search only
whether the word "Time" is present in it(which is valid in this
case).so if i have "CastinTime",still this should hold.
I need to use this in a "if" statement and code.Can someone help me
in this.
Thanks .
 
A

Ant

Hi,
How can i match a part of string and branch to some part of code.
Ex If there is a string like "Timeout" and i want to search only
whether the word "Time" is present in it(which is valid in this
case).so if i have "CastinTime",still this should hold.
I need to use this in a "if" statement and code.Can someone help me
in this.
Thanks .

if "Time" in text:
# do stuff.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,131
Latest member
IsiahLiebe
Top