Bib{TeX,LaTeX}: fix for uppercase regex

Terminate pattern matching on encountering closing whitespace, comma, or
a closing parenthesis.
Ex: "A (TEST) case" -> "A ({TEST}) case"