hello,
I want to check in bash shell if a string on VAR does not begin with "-" and at the same time if the string is built of [-_a-zA-Z0-9] but not longer than specified on LEN variable
LEN=10
[[ $VAR =~ ^[_a-zA-Z0-9][-_a-zA-Z0-9]{1,${LEN}}$ ]]
how to test length of whole marked in red is not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.