Bash assignment regex correction