O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other Commands That Use Regular Expressions

Several Tcl commands use regular expressions.

  • lsearch takes a -regexp flag so that you can search for list items that match a regular expression. The lsearch command is described on page 64.

  • switch takes a -regexp flag, so you can branch based on a regular expression match instead of an exact match or a string match style match. The switch command is described on page 71.

  • The Tk text widget can search its contents based on a regular expression match. Searching in the text widget is described on page 463.

  • The Expect Tcl extension can match the output of a program with regular expressions. Expect is the subject of its own book, Exploring Expect (O'Reilly, 1995) by Don Libes.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required