alphanumeric - REGEX rejecting simple alphamumeric -


I do not get it; It should be simple:

Why is this text box entry:

  Foo 2010  

valid by this reggx:

  validation expression = "^ [a-zA-Z0-9 -_!] + $"  

Throw an invalid entry error? Its purpose is to allow alphamumerics, spaces, dashes, underscores, and exclamation marks.

The REEGEx gives me a headache ...

dash - must be placed before [ or ] or should be avoided , otherwise it should be classified as a category metacharactor Will be considered.

Try it: Validation Exercise = "^ [-a-zA-Z0-9 _!] + $"


Comments