Is there a difference between ^[a-zA-Z]
and [^a-zA-Z]
?
When I check in C#,
Regex.IsMatch("t", "^[a-zA-Z]") // Return true (I think it's correct)
Regex.IsMatch("t", "[^a-zA-Z]") // Return false
There are alot of web site using [^a-zA-Z]
for alphabet. I'm not really sure which one is correct answer.
Could someone please shed the light?