       # Correct Comment Placement
        expr {1}
    }
    c {
        expr {2}
    }
    default {
        expr {3}
    }
}</PRE>
<P>
When matching against regular expressions, information about what
exactly matched is easily obtained using the <B>-matchvar</B> option:
<P>
<PRE><B>switch</B> -regexp -matchvar foo -- $bar {
    a(b*)c {
        puts &quot;Found [string length [lindex $foo 1]] 'b's&quot;
    }
    d(e*)f(g*)h {
        puts &quot;Found [string length [lindex $foo 1]] 'e's and&#92;
       