[GRASS5] Need help with tcltk regexp

Glynn Clements glynn at gclements.plus.com
Tue Feb 15 07:38:14 EST 2005


Michael Barton wrote:

> Here is my procedure. I hope someone can tell me why it is not working. I
> can't get it to recognize either of the regexp clauses. The variable mon can
> be set to values of x0, x1, x2, etc.

>             if {[regexp -nocase {$mon.*not running} $line buffer monitor]} {

The $mon won't be expanded; use quotes instead of braces, i.e.

              if {[regexp -nocase "$mon.*not running" $line buffer monitor]} {

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list