Bash Extract Substring Regex Pattern