Yet another template speedup: Performing regex matches on byte strings

This speeds up rendering of huge tickets immensely.