J
Jyoti Agarwal
Hi All,
I have a textfield which accepts a name. I am validating the text field
using the following statement
Regex.IsMatch(txtFirstName.Text, ("^[a-zA-Z\-\.]"))
The validation requirement is that it should not allow numbers or any
special characters. But the above regular expression still accepts special
characters and numbers.
Can you suggest the correct regular expression?
Thanks in advance
Jyoti
I have a textfield which accepts a name. I am validating the text field
using the following statement
Regex.IsMatch(txtFirstName.Text, ("^[a-zA-Z\-\.]"))
The validation requirement is that it should not allow numbers or any
special characters. But the above regular expression still accepts special
characters and numbers.
Can you suggest the correct regular expression?
Thanks in advance
Jyoti