boolean = IsAlpha(string)
Example Usage:
ASP Source Code:<% ' IsAlpha returns True response.write IsAlpha("This Thing") response.write IsAlpha("This_Thing") response.write IsAlpha("Some_Other Thing") ' IsAlpha returns False response.write IsAlpha(37.8) response.write IsAlpha("37.8A") response.write IsAlpha("ABSD= acscrrrw!") %>
<% Private Function IsAlpha(byVal string) dim regExp, match, i, spec For i = 1 to Len( string ) spec = Mid(string, i, 1) Set regExp = New RegExp regExp.Global = True regExp.IgnoreCase = True regExp.Pattern = "[A-Z]|[a-z]|\s|[_]" set match = regExp.Execute(spec) If match.count = 0 then IsAlpha = False Exit Function End If Set regExp = Nothing Next IsAlpha = True End Function %>