caps: Minor
caps: Adjust start-of-string / end-of-string to match xterm

No idea what they are for, but here's a test case:

$ echo -e "\eXas\e\\df

It should only show "df".  Ie, the portion between ESC X and
ESC \\ is skipped.