title: How do I verify that a string only contains letters, numbers, underscores and dashes?
body: <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>