Other Commands That Use Regular Expressions

   

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

Table of Contents
Chapter 11.  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.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net