<p>I know how to do this if I iterate through all of the characters in the string but I am looking for a more elegant method.</p>

use a regex and see if it matches!
```
```
([a-z][A-Z][0-9]\_\-)*
```
```