4
我想弄清楚如何在正則表達式匹配中使用字符串。我一直在google上搜索一個小時,我想問問專家。如何在正則表達式中使用變量(TCL /期望)
這工作:
#!/usr/bin/expect
set MYSTR "value"
if [ regexp -nocase "$MYSTR" $outcome matchresult ] then {
...
}
這不是工作:
#!/usr/bin/expect
set MYSTR "value"
if [ regexp -nocase {something here:\s+$MYSTR} $outcome matchresult ] then {
...
}
我敢肯定,這是一個簡單的語法問題。
感謝您的幫助
THANK YOU!謝謝! – Jared 2012-08-01 23:29:38