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.
You could always use a list comprehension and check the results with all, it would be a little less resource intensive than using a regex: all([c in string.letters + string.digits + ["_", "-"] for c in mystring])
all([c in string.letters + string.digits + ["_", "-"] for c in mystring])