Would you want me to change it to this, so it covers your cases ?
```regex
/^\S*[\$%>#] +/
```

It would also cover prompts ending with `#` (usually root shells) and with `>` (tcsh-style)