473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

[expect] strange error (re)


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.
Jul 22 '05 #1
1 1415
Sektor van Skijlen wrote:
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 }
}"

Are you sure you are posting to the correct newsgroup?
I couldn't find these identifiers in the _standard_ C++ specification:
expect
lappend
response_line
$
expect_out
exp_continue

Remember, this newsgroup, news:comp.lang.c++, discusses the
C++ language, not the C language and not the C# language.

Please read the welcome.txt and FAQs below.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
2
by: Mak | last post by:
Hi Everybody, I try set the Expect: 100-continue in my request to server. The way I do it is by setting : <META http-equiv="Expect" content="100-continue"> in my html page. But, it does not...
0
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
3
by: Christian Lutz | last post by:
Hy there I have a Web Services written in Java, running on Tomcat. The Client is written in C#. When i monitor the request/Response with TCPMon (included in Tomcat) i can observer the following...
0
by: sunadmn | last post by:
Hey all I have installed the PECL expect module and for the life of me I can get it to work. Below is a sample script I am running and the error message I am recieving. <?php ini_set...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
1
by: graphman | last post by:
I have a perl script that I'm calling using php's shell_exec that uses an expect module to go to another system to pull tiff files. The php perl combination works great when I launch from the...
3
by: Shelly | last post by:
I am encountering two strange problems. First one: I get a "server misconfiguration error", but only sometimes. It occurs on the first screen that accesses the database on a submit. This error...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.