South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Something likeCode:Public Shared Function IsAlphaNumeric(ByVal strToCheck As String) As Boolean Dim pattern As Regex = New Regex("[^a-zA-Z0-9]") Return Not pattern.IsMatch(strToCheck) End Function
Imports System.Text.RegularExpressions
Public Function checkAlphaNumeric(strInputText As String) _
As Boolean
Dim intCounter As Integer
Dim strCompare As String
Dim strInput As String
checkAlphaNumeric = False
For intCounter = 1 To Len(strInputText)
strCompare = Mid$(strInputText, intCounter, 1)
strInput = Mid$(strInputText, intCounter + 1, Len _ (strInputText))
If strCompare Like ("[A-Z]") Or _
strCompare Like ("[a-z]") Or _
strCompare Like ("#") Then
checkAlphaNumeric = True
Else
checkAlphaNumeric = False
Exit Function
End If
Next intCounter
End Function
Thanks alot guys, really helped alot. Where did you guys learn all this varsity? youtube?