1''
1''

Reputation: 27105

Match a blank line in expect

How can I match a blank line in expect? expect -r "" {send "y\n"}" causes y to be entered immediately.

| 
| Type 'y' to accept:
| 
                          <---- match this blank line!

Upvotes: 3

Views: 1668

Answers (1)

1&#39;&#39;
1&#39;&#39;

Reputation: 27105

Etan Reisner's suggestion of matching consecutive newlines works.

expect -r "\r\n\r\n" {send "y\n"}

Upvotes: 1

Related Questions