|
|||
Download User Info New User FAQ Tutorials Demos Commands Variables Troubleshooting Sysop Info Sysop FAQ Theory Installation Management Tests Troubleshooting Feedback Resources Release Notes Credits Disclaimer |
Synopsis * Description * Keywords Perform substitutions based on regular expression pattern matching
This command matches the regular expression exp against string, and it copies string to the variable whose name is given by varName. If there is a match, then while copying string to varName the portion of string that matched exp is replaced with subSpec. If subSpec contains a "&" or "\0", then it is replaced in the substitution with the portion of string that matched exp. If subSpec contains a "\n", where n is a digit between 1 and 9, then it is replaced in the substitution with the portion of string that matched the n-th parenthesized subexpression of exp. Additional backslashes may be used in subSpec to prevent special interpretation of "&" or "\0" or "\n" or backslash. The use of backslashes in subSpec tends to interact badly with the Tcl parser´s use of backslashes, so it´s generally safest to enclose subSpec in braces if it includes backslashes. If the initial arguments to regexp start with - then they are treated as switches. The following switches are currently supported:
match, pattern, regular expression, substitute
|
||
Copyright © 1995-1999 NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA. All Rights Reserved |