I\'m looking for a regex that will check if the string only consists of the letters a-z, numbers, underscore (_) and hyphen (-). I have tried this,
_
-
The regex should be: '^[\w\d-]+$'