Solved

how do you exclude something or include it?

Posted on 2011-02-28
7
190 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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:
ewangoya 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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