drop unneeded regex compiles
Fix LaTeX exit code detection