Special characters in `expect` for matching Bash prompts
Opened this issue · 0 comments
rudolfbyker commented
Is your feature request related to a problem? Please describe.
I'm trying to match a bash prompt like user@host:~$
but special characters like :
and ~
and $
don't seem to work in the expect
field. It never matches.
Describe the solution you'd like
I would expect this regex to work: \w+@\w+:~\$
.
See https://regex101.com/r/HbZSxK/1
Describe alternatives you've considered
This is what I'm using instead, but it's not ideal: \w+@\w+.{3}