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