Solved

how do you exclude something or include it?

Posted on 2011-02-28
7
196 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:eNarc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Assisted Solution

by:maosalah
maosalah earned 250 total points
ID: 35000441
Use Pos function
For example : if Pos('birthday', 'string Value') > 0 then do something  else do something.

good luck
0
 
LVL 19

Expert Comment

by:Thommy
ID: 35002039
0
 
LVL 19

Expert Comment

by:Thommy
ID: 35002074
If you are working with multi-byte characters sets (MBCS)...

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



0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Thommy
ID: 35002106
Using System.Pos is also possible...

System.Pos
http://docwiki.embarcadero.com/VCL/en/System.Pos
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 250 total points
ID: 35013553

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
 
LVL 100

Expert Comment

by:mlmcc
ID: 35275399
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question