[ale] expect script question

Yong Wang yongwang at mindspring.com
Fri Aug 24 00:29:52 EDT 2001



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.





More information about the Ale mailing list