Hi
I need a regex to validate a string that must ends with "/" and 2 digits
Examples
"aaa/" not ok
"aaa/0a" not ok
"bdc/88" ok
Thanks
Jorge
Printable View
Hi
I need a regex to validate a string that must ends with "/" and 2 digits
Examples
"aaa/" not ok
"aaa/0a" not ok
"bdc/88" ok
Thanks
Jorge
i assumed that the first part of the string contains only char not numVB Code:
Dim tbox As TextBox = DirectCast(sender, TextBox) If Regex.IsMatch(tbox.Text, "^([a-zA-Z]+)/([0-9]{2,2})$") = True Then Else MsgBox("Not valid String") End If
Modified it slightly its working now
VB Code:
Dim tbox As TextBox = DirectCast(sender, TextBox) If Regex.IsMatch(tbox.Text, "^([a-zA-Z0-9.]+)/([0-9]{2,2})$") = True Then Else MsgBox("Not valid String") End If
Thanks
Jorge