Bash Script Match Regex Javascript Validator