Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 158

expect script regular expression not working

$
0
0

In expect script I am trying to capture some text from output

Text in output is like ivalue=16ef7baa-0de1-48bf-9e04-d486defbee1c,

code:

expect -re {^(ivalue)\=(.*)(\,)$}puts "expect_out (0, string)"

output :

[142C \r\u001b[7A\u001b[11C\u001b[?7h\u001b[0m\u001b[?12l\u001b[?25h" (spawn_id exp4) match regular expression "^(ivalue)\=(.*)(\,)$"? Gate "inum=*,"? gate=yes re=no

but unable to capture this value using regular expression

appreciate your help


Viewing all articles
Browse latest Browse all 158

Trending Articles