Solved

how do you exclude something or include it?

Posted on 2011-02-28
7
188 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now