Is there a way with expect interpreter to say something like
expect {
"keyword1" {send "action1"}
"keyword2" {send "action2"}
unpredicted stuff {send "action3"}
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may use
exp_continuein the pattern bodies to have expect loop after a match. You may use a general.*none-of-the-above type regexp for “unexpected stuff”, though instead of.*you should limit it to the line or word granularity the other keywords apply to.