-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Tcl/Tk 8.5 Programming Cookbook
Regular expressions provide us with a powerful method to locate an arbitrarily complex pattern within a string. The regexp command is similar to a Find function in a text editor. You search for a defined string for the character or the pattern of characters you are looking for and it returns a Boolean value that indicates success or failure and populates a list of optional variables with any matched strings. The -indices and -inline options must be used to modify the behavior, as indicated by this statement. But it doesn't stop there; by providing switches, you can control the behavior of regexp. The switches are as follows:
|
Switch |
Behavior |
|---|---|
|
|
No actual matching is made. Instead |
|
|
Allows the use of expanded... |
Change the font size
Change margin width
Change background colour