I am running Sonar and checkstyle has a regexp rule like this:
^[a-z][a-zA-Z0-9]*$
I would like to modify it so that one or more underscores are allowed. How would I change this? Thanks!
I am running Sonar and checkstyle has a regexp rule like this:
^[a-z][a-zA-Z0-9]*$
I would like to modify it so that one or more underscores are allowed. How would I change this? Thanks!
Those are character classes.
If you want to allow underscores anywhere:
^[a-z_][a-zA-Z0-9_]*$
If you want to allow underscores anywhere except the first character:
^[a-z][a-zA-Z0-9_]*$