具体来说,总体的多线模式的确有相应的空间,但并不一定能看到你重新思考。 尤其是,新线路最终可以由虚拟终端系统改造。 引证:
expect {
-re {^0 d+[
]{1,2}0 d+$} {
# Just for debugging (and you might need to write to a log...)
binary scan $expect_out(0,string) c* byteList
puts [join $byteList ","]
# Now do the rest of your code
pass "$test_name"
}
}
Note that I put the RE in braces instead of double quotes, because that keeps the number of backslashes down.
Once you know what s actually being seen by Expect, you can code it more directly. I d normally just say print it out without any fussing around, but since you re dealing with newlines it s easier to read the ASCII bytes.