I'm trying to figure out how to use a string in a regexp match. I have been searching on google for an hour, figured i would just ask the experts.
This works:
#!/usr/bin/expect
set MYSTR "value"
if [ regexp -nocase "$MYSTR" $outcome matchresult ] then {
...
}
This is not working:
#!/usr/bin/expect
set MYSTR "value"
if [ regexp -nocase {something here:\s+$MYSTR} $outcome matchresult ] then {
...
}
I'm sure it's a simple syntax problem.
Thanks for your help