How Do I Find How Many Occurrences of ";" there are in a value?

M

MSUTech

Hello,

I am working on an asp page.. I would like to find out how many semi-colons
exist in a request variable. I thought I could use something like INSTR,
but, that just tells me WHERE the first occurrence is. Is there another way
to find out HOW MANY occurrences there are within an entire variable?

thanks,

Chip
 
M

McKirahan

MSUTech said:
Hello,

I am working on an asp page.. I would like to find out how many semi-colons
exist in a request variable. I thought I could use something like INSTR,
but, that just tells me WHERE the first occurrence is. Is there another way
to find out HOW MANY occurrences there are within an entire variable?

thanks,

Chip

UBound(Split(your_string,";"))
 
P

Phill. W

.. . .
I would like to find out how many semi-colons exist in a request variable.

Just to be different ...

sVar = Request.QueryString( "Var" )
iLen = Len( sVar ) - Len( Replace( sVar, ";", "" ) )

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,039
Messages
2,570,376
Members
47,032
Latest member
OdellBerg4

Latest Threads

Top