Fixes #7 by replacing regular expression with character validation
fixed cpplint issue