Parsing regexps and getting the fu**ing error message "parentheses () not balanced"



Hello all!
I'm trying to write a script with this piece of code somewhere:

switch -regexp $current_net {
[^\[]+\Z {
# first case: <net_name> (1bit width)
switch [llength $pins($module_name,$k)] {
......

The first "switch" saying that I want to parse any regexp with no '['
and going to the end of string $current_net.

Then Tcl says :
couldn't compile regular expression pattern: parentheses () not
balanced
while executing
"switch -regexp $current_net {

etc.

How can I get rid of this message? And it's not the first time I have
such odd problems :-)
Thanks.

.



Relevant Pages

  • Re: Log analysis server suggestions? [long]
    ... parse sendmail message ... whether to deal with variants as separate cases or to make the ... quickly at a regexp and a string and tell if it'll match. ... forms of syslog messages in 10 years of syslog data. ...
    (freebsd-questions)
  • Re: The mechanism behind bouncing...
    ... Contact bounce is nothing more than a spring-loaded screen door ... and the answer is: "Because the switch contacts make ... You seem to be saying that when it's convenient for you to use the ... "authority" loic but its wrong and should specially not be used in a ...
    (sci.electronics.basics)
  • Re: XP Question about Metaphor
    ... >> So I think there is a real difference in what agile methods are saying ... Most agile methods say that you switch between design and coding ... compare it to travelling up a waterfall (although, ...
    (comp.object)
  • Re: KH 2007 Products- details & info are here
    ... *any idiot knows* that they will switch soon enough - they ... They will switch to true ISIS in 2008 (and I'm not spouting randomly ... well my basis for saying that is the fact that they didn't just start ...
    (rec.sport.unicycling)
  • Digital switch clarify please
    ... They are running commercials in my area southern wi. ... I have an argument with someone saying this isn't ... Will you need a digital box to receive basic cable once the switch over ... or is the cable company going to convert signals to analog so you willn't ...
    (alt.tv.tech.hdtv)