What is the best way to validate a string with a pattern? I would use PCRE but I don’t know if it is embedded in each shell and how to use it.
For example, how could I validate that variable only contains A-Z, a-Z and 0-9 and does not contain spaces, ‘, “, … ?
1 Answer