Forum Discussion
hooleylist
Dec 02, 2010Cirrostratus
Hi John,
I don't normally recommend regexes as they're a lot more expensive than string commands. However, it would take a lot of string commands to do this in one line. Can you try this?
http://[HTTP::host][regsub "find_this_string" [HTTP::uri] "replacement_string"]
http://www.tcl.tk/man/tcl8.4/TclCmd/regsub.htmM5
-all
All ranges in string that match exp are found and substitution is performed for each of these ranges. Without this switch only the first matching range is found and substituted. If -all is specified, then ``&'' and ``\n'' sequences are handled for each substitution using the information from the corresponding match.
Aaron