^[a-zA-Z][a-zA-Z0-9_\-]*$
but this does not seem to be working. Can someone help?
I am using a HTML5 pattern for a text field.
A:
Your regex is correct, except for the fact that you have to include the hyphen in the character class, otherwise it is treated as a range.
^[a-zA-Z][a-zA-Z0-9_-]*$
Scrive articoli informativi per semplificare la scelta di servizi professionali e comprendere meglio i costi.