title: ‘Invalid bare word "regexp"’ in Tcl script
body: <pre><code>proc mulval { addr } {
  
  if {regexp {^([2][2-3][0-9])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$} $addr } {
          puts "Valid IP Multicast Address"
      } else { 
          puts"Invalid IP multicast Address"
      }
  
  }
  </code></pre>
  
  <p>The above code generates the error invalid bareword "regexp" in tcl .</p>
  
  <p>I wanna know what is the mistake in the word and what is invalid bareword in tcl.How to debug.</p>