That's what test2.tcl in this [L1 ] "Regular Expressions" [L2 ] column does.
WLD - as of 2003/09/15, the link (zeus.itworld.com) appears to be dead.
Category GUI