Sathyaish,
Try something like:
Private Sub MyTextBox_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles MyTextBox.KeyPress
e.Handled = ChkEntry(e.KeyChar)
End Sub
Private Function ChkEntry(ByVal c As Char) As Boolean
Return c = "%" Or c = "%"
End Function
Doug
"Sathyaish" <sa*******@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
RegEx heros,
I want to validate a certain field such that it shouldn't contain the
percentage character (%) or the asterisk character symbol (*). The
specification is that:
(1) The field must not contain the percentage symbol; AND
(2) The field must not contain the asterisk symbol.
It should contain neither of them. Can you please help me with the
RegEx for this?