' Allow spaces, underscores and any integer or letter of the alphabet.
' Remove anything else...
Disallowed = "[]+=)(*&^%$#@!|\/?><,{}:;.-~`'" & chr(34) & vbCrLf & vbTab
Response.Write RmChr(Input, Disallowed) & "<BR>"
' remove upper case letters...
Disallowed = ucase("abcdefghijklmnopqrstuvwxyz"
Response.Write RmChr(Input, Disallowed) & "<BR>"
%> provide tools to let people become their best.
declare the string as the input
so
DIM input
input = "the string or value of something"
In the code above you would only have to do this
' String to clean
Input = "your sting here"
and then the you disallowed the same using what you don't want being "$"
If you only want to remove the first 2 $ and not any other $ characters in the string you can try something like this:
<%
dim str
str = "$$money"
if mid(str,1,2) = "$$" then
' remove the first 2 characters because they are $$
Response.Write mid(str,3,len(str)-2)
else
Response.Write str
end if
%>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.