4.3BSD-UWisc/lib/learn/editor/L37.2e

#print
Here is something a bit trickier.  We want to add
an extra space after each word "lengthen".  However,
some of the instances of "lengthen" are followed
by commas or right parentheses and we want the space
after the comma or right parenthesis in that case.  That
is, the desired transformations are:
   now              new
lengthen xx      lengthen  xx
lengthen, xx     lengthen,  xx
lengthen) xx     lengthen)  xx
lengthen), xx    lengthen),  xx
It should only take one substitute command to do this.
Remember that "*" matches zero or more instances of
whatever precedes it.
Try those changes on the first six lines of the file
"text" in this directory.  Then rewrite the file and
type "ready".
#create Ref
To lengthen  this is easy,
whereas to lengthen,  rather
than to shorten, on the previous line
is hard.  (To lengthen)  is an
infinitive.  I said to him, (please lengthen),  and
he did so.
Why not lengthen this word?  Notice it is on line 7.
#create text
To lengthen this is easy,
whereas to lengthen, rather
than to shorten, on the previous line
is hard.  (To lengthen) is an
infinitive.  I said to him, (please lengthen), and
he did so.
Why not lengthen this word?  Notice it is on line 7.
#user
#cmp text Ref
#log
#next
37.2f 5