exceptコマンドで正規表現によるマッチングを行う場合は-regexp(または-re)を用いますが、
‘(‘や’)’のエスケープを行う場合は’\’を2つつける必要があるようです。
test.sh
#!/bin/sh echo -n "(What is your name):" read ans echo "Hello, $ans"
expect.sh
#!/bin/bash
expect -c '
spawn /tmp/test.sh
set timeout 1800
expect -re "\\(What is your name\\):" {
exp_send "aaa\r"
exp_continue
}
'


