Stream Editor
A program that parses files or standard input, changes it according to a given set of rules, mostly based on Regular Expressions, and sends the new data to standard output. Unbelievably fast.
Erik Pemente keeps a very good amount of info and links in this page: http://www.student.northpark.edu/pemente/sed/ A spirited introduction to sed programming appears here [L1 ].
There is a page dedicated to the Tcl's implementation of Regular Expressions on this wiki. Tcl uses ARE. sed uses Basic and Extended Regular Expressions only.