bertino12
asked on
Like operator to determine if alphanumeric
I am writing a condition to determine if a letter in a string is alphanumeric. It seems to be failing.
If Mid(strNew, i, 1) Like ("[A-Z]") Or Mid(strNew, i, 1) Like ("[a-z]") Or Mid(strNew, i, 1) Like ("#") Then
I keep falling into this condition even if the character is "[" or "("
This doesnt seem to be working. Is this the wrong syntax for find alpha numerics in classic ASP?
If Mid(strNew, i, 1) Like ("[A-Z]") Or Mid(strNew, i, 1) Like ("[a-z]") Or Mid(strNew, i, 1) Like ("#") Then
I keep falling into this condition even if the character is "[" or "("
This doesnt seem to be working. Is this the wrong syntax for find alpha numerics in classic ASP?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How about
If asc(Mid(strNew, i, 1) ) > 65 or asc(Mid(strNew, i, 1) )< 127 Then
If asc(Mid(strNew, i, 1) ) > 65 or asc(Mid(strNew, i, 1) )< 127 Then
ASKER
This seems to work beautifully. thanks.
elseif objRegExp.Test(Mid(strNew, i, 1)) = true then
I am parsing through a string(from a textbox a user puts in search strings) and inserting wildcard symbols to words for an oracle query.
elseif objRegExp.Test(Mid(strNew,
I am parsing through a string(from a textbox a user puts in search strings) and inserting wildcard symbols to words for an oracle query.
ahh...
glad I could help
glad I could help
strTested = objRegExp.Test(variable) 'for a boolean value