S
Sektor van Skijlen
couldn't compile regular expression pattern: quantifier operand invalid
while executing
"expect -nobrace >|#S {} -re {*
} { lappend response_line $expect_out(buffer); exp_continue }"
invoked from within
"expect {
{>|#S} {}
-re "*\n" { lappend response_line $expect_out(buffer); exp_continue }
}"
The fragment of source code, which invokes this error:
set response_line {}
expect {
{>|#S} {}
-re "*\n" { lappend response_line $expect_out(buffer); exp_continue }
}
What I wanted to do is:
If ">|#S" received, stop reading. Otherwise append read line to the
response_line list and continue reading.
I can read the "end of response" in two ways: one of them is the string
above, another is a line, which looks as follows (the response also begins
from this string):
------ |-------------------------------------
(it is not constant the number of the first dashes - it depends on "something")
A very strange thing is that, when I had such pattern:
{-+ \|-+}
It matches the beginning of the response, then the cited above code is
executed. When there was {-+ \|-+} in the first expect's rule, the error
message was the same.
Or maybe somebody knows more appropriate way to do this?
--
1 6 1 7 4 4 2 548 g4bc7a4 66z 3xt7w v1y z9p1 120 32
(( Michal "Sektor" Malecki w4 66 64 73 7564 24 5 v 34 4
)) ektor van Skijlen 1 5 5 1 844 a v r z 4
Software engineer, Motorola GSG Poland 1 2 2a 1 4
WARNING: Opinions presented by me on usenet groups are my personal opinions
ONLY and are not connected to the employer.
while executing
"expect -nobrace >|#S {} -re {*
} { lappend response_line $expect_out(buffer); exp_continue }"
invoked from within
"expect {
{>|#S} {}
-re "*\n" { lappend response_line $expect_out(buffer); exp_continue }
}"
The fragment of source code, which invokes this error:
set response_line {}
expect {
{>|#S} {}
-re "*\n" { lappend response_line $expect_out(buffer); exp_continue }
}
What I wanted to do is:
If ">|#S" received, stop reading. Otherwise append read line to the
response_line list and continue reading.
I can read the "end of response" in two ways: one of them is the string
above, another is a line, which looks as follows (the response also begins
from this string):
------ |-------------------------------------
(it is not constant the number of the first dashes - it depends on "something")
A very strange thing is that, when I had such pattern:
{-+ \|-+}
It matches the beginning of the response, then the cited above code is
executed. When there was {-+ \|-+} in the first expect's rule, the error
message was the same.
Or maybe somebody knows more appropriate way to do this?
--
1 6 1 7 4 4 2 548 g4bc7a4 66z 3xt7w v1y z9p1 120 32
(( Michal "Sektor" Malecki w4 66 64 73 7564 24 5 v 34 4
)) ektor van Skijlen 1 5 5 1 844 a v r z 4
Software engineer, Motorola GSG Poland 1 2 2a 1 4
WARNING: Opinions presented by me on usenet groups are my personal opinions
ONLY and are not connected to the employer.