GetDigits

Extracts digits out of a string

<%
Function GetDigits(value)
dim s, sd, i
s = ""
for i = 1 to Len(value)
sd = Mid(value, i, 1)
if (Asc(sd) >= Asc("0")) and (Asc(sd) <= Asc("9")) then
s = s & sd
end if
next
GetDigits = s
End Function
%>

Views 945 Downloads 339

''

JeffSmith
26
Texts + Strings Classic ASP
Revisions

v1.0