Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special characters in expect for matching Bash prompts #1086

Open
rudolfbyker opened this issue Feb 21, 2024 · 0 comments
Open

Special characters in expect for matching Bash prompts #1086

rudolfbyker opened this issue Feb 21, 2024 · 0 comments

Comments

@rudolfbyker
Copy link
Contributor

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

image

Describe alternatives you've considered

This is what I'm using instead, but it's not ideal: \w+@\w+.{3}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant