Bash Parse String Regex Javascript