write-reference.sh: not using potentially empty regex parens for function names