LaTeX regex

Small change to keep it from capturing \end{document}