[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] expect script question
- Subject: [ale] expect script question
- From: yongwang at mindspring.com (Yong Wang)
- Date: Fri, 24 Aug 2001 00:29:52 -0400 (EDT)
Hi, I am trying to write an expect script to interact with POP mail
server and I am stuck at the regular expression parsing of "stat" POP
command. The output string from "stat" is "+OK 12 3456". The following
expect code just keep complaining about bad regular expression:
send "stat\n"
expect -re "+OK (\[0-9]*) (\[0-9]*)\n" {
send_user "# of messages: $expect_out(1,string)\n"
} timeout {
send_user "POP timeout\n"
}
Any help would be appreciated. Thanks.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.