how do you exclude something or include it?

if I wanted to know if a string had birthday in, I could choose to include it or exclude it like.

if the string contains birthday, it will do something, else do something.
LVL 5
eNarcAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Ephraim WangoyaConnect With a Mentor Commented:

Depends on what you are searching for, of you mean the actual birthday eg 01/01/1965, then you have to do pattern matching.

In that case, use a regular expression TRegRex or TPerlRegEx

TPerlRegEx is shipped with Delphi2010
If you are working in Delphi 7 you can download it from the net
Refer to this site for more info

http://www.regular-expressions.info/delphi.html
0
 
maosalahConnect With a Mentor Commented:
Use Pos function
For example : if Pos('birthday', 'string Value') > 0 then do something  else do something.

good luck
0
 
ThommyCommented:
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ThommyCommented:
If you are working with multi-byte characters sets (MBCS)...

SysUtils.AnsiStrPos
http://docwiki.embarcadero.com/VCL/en/SysUtils.AnsiStrPos



0
 
ThommyCommented:
Using System.Pos is also possible...

System.Pos
http://docwiki.embarcadero.com/VCL/en/System.Pos
0
 
mlmccCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.