Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I check for Double quote, single quote, tab etc

Status
Not open for further replies.

bdenson

Programmer
Dec 12, 2001
14
GB
I am trying to check for various chars such as double quote, single quote, tab, comma etc. I have tried using

count for field1 $ "\x23" to DoubleQuoteCount

and

count for field1 $ "\t" to TabCount

and so on but I dont get the results I expect.

Am I doing something wrong, or sould I recheck my expected results?

Thanks

barry
 
Hi Barry,

Try something like:

COUNT FOR CHR(34) $ field1 TO DoubleQuoteCount
or
COUNT FOR '"' $ field1 TO DoubleQuoteCount

and similarly for the other characters.

Jim
 
Hi Barry,

Try using the OCCURS(cSearchExpression, cExpressionSearched)function.
This one returns the number of times a character appears in a string.

HTH,
Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
Thanks Weedz, but I want to know the number of matching fields, not characters.

Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top