Fix regexp for detecting beginning and end of tt command.

^ and $ take higher precedence than | so it needs ().

Test Plan:
cross-fingers

Auditors: csilvers