From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078620310310.tru64-unix-managers.marc@archive.invalid> From: Wayne Sweatt Date: Fri, 05 Dec 1997 15:48:17 +0000 To: tru64-unix-managers Subject: Expectk - Any body an expert?! (Tcl/Tk) X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078620310310 I know this isn't strictly Digital Unix, but I'm not getting any response from the "comp.lang.tcl" newsgroup. I thought I'd re-post it here in case someone has an idea. I've scanned the Don Libes' Expect book, but couldn't resolve it. Here's the question: I am having a problem getting long messages stored fully into expect_out(1,string). It seems to do the match check before the entire message gets there. It seems to be getting chopped off at random lengths using a send that always will receive the same message at the same length in bytes. Is it possible that my buffer is getting full? Will this cause an immediate "-re" check? I am running tcl7.5, tk4.1,expect5.2 and oratcl2.4b3 under Digital Unix 4.0b. I have a "set timeout -1" before my expect_background. I didn't notice any difference. Just in case it makes a difference, Here's the format of the expect_background code: proc get_messages global som eom expect_background { -re "^\[? \x07\]*${som}(.*)${eom}" {process_message $expect_out(1,string) } eof { handle_eof } -re "\\? ${som}(.*)${eom}" {process_message $expect_out(1,string) } eof { handle_eof } -re "${som}(.*)${eom}" {process_message $expect_out(1,string) } eof { handle_eof } } What happens, is that instead of getting an: expect-background: does " ${som} blah,blah,blah ${eom} match regular expression "^\[? \x07\]*${som}(.*)${eom}" I get: expect-background: does "${som} blah,blah,blah bl" match regular expression "^\[? \x07\]*${som}(.*)${eom}" with the message cut off before it ever gets to the ${eom}! Any ideas?? Thanks, Wayne