Valid daml variable names

I am trying to define a regex that will match a valid variable name in daml.
For example alice is allowed whereas Alice is not.

I have this so far: ^[a-z][a-zA-Z0-9'_]*$

Is it correct? Thanks

DAML follows the Haskell syntax for variable names which is described here. The definition for varId is the correct one (ignoring symbolic infix operators). You are pretty close. Ignoring unicode characters, the correct regex is ^[a-z_][a-zA-Z0-9'_]*$. Of course reserved keywords like case are excluded so it’s not quite accurate but probably good enough™.