While using regular expression I found one issue. Can any one please give proper reason for the below scenario's
Scenario-1
var regExp=/^[a-zA-Z0-9!-@#$^_:,. ]$/;
regExp.test('<')// True
Scenario-2
var regExp=/^[a-zA-Z0-9-!@#$^_:,. ]$/;
regExp.test('<')// false
There is a change with Exclamation symbol position in regular expression.