In ed I have a cleanup script which I can apply to several files at once. The script removes things like blank lines and spaces between words. To run it on a file or multiple files, I type this command: ed [name of file(s)] < cleanup-script I converted all the regular expressions in the file into sam regex format and tried the same, but to no avail.  Here is a list of some of the commands: .x s/\*//g ,x/^ +/s/// ,x/ +$/s/// ,x/ +/s// / ,x/^$\n/d ,x/‘‘|’’/s//"/ ,x/“|”/s//"/ ,x/‘|’/s//"/ ,x/^ +/s/// ,x/ +$/s/// ,x/ +/s// / ,x/^$\n/d ,x/‘‘|’’/s//"/ ,x/“|”/s//"/ ,x/‘|’/s//"/ ,x/teh/c/the/ wq I am not even sure sam can do this, but if it can, I would appreciate some guidance on how to do it.  ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-M81420cb8a514930c24cd6ad6 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription