Bash Script Match Regex Javascript Function How To Use