scancontext is the first of a set of commands (in the TclX package) intended to be used together to search through a file for regular expression matches and then executing Tcl code on the match. This provides a facility similar to awk.
scancontext creates a handle for the collection of regular expressions and tcl commands to execute when the expressions are located.
The scancontext command manages file scan contexts. A scan context is a collection of regular expressions and commands to execute when a specific regular expression matches a line of the file. A context may also have a single default match, to be applied against lines that do not match any of the regular expressions. Multiple scan contexts may be defined and they may be reused on multiple files. A scan context is identified by a context handle.
The scancontext command takes the following forms:
See also scanmatch and scanfile.