We do not expect some escape codes printed to terminal
It turns out that we do not expect some terminal escape codes that for example bash outputs to configure terminal. One example is https://cirw.in/blog/bracketed-paste.
There has to be a way to remove them. These codes can potentially break otherwise all right regular expressions and we can't interpret them anyway.