4.3BSD-UWisc/lib/learn/editor/L54.1b

#print
The fact that the system remembers the last regular expression
it had is particularly useful when the regular expression is
complex.  Suppose, for example, you know that the
words "first" and "second" appear on the same line and you wish
to delete them and everything between them.  You could write
  /first.*second/s/first.*second//p
but isn't it easier to do
  /first.*second/s///p
Edit the file "passage"; the words "twentieth" and "impending" appear
on the same line.  Replace them and everything between
them by the word "impending" (i.e. delete from "twentieth"
up to but not including "impending").  One command, if you can.
Then rewrite the file and type ready.
#create Ref
   America's rise to world power is a consequence of the nation's
geographic position, natural resources, and dynamic energy.  For
the first century and more of national history, however, continental
expansion and internal developments largely absorbed the energies
of the American people.  Every dictate of public interest emphasized
the importance of avoiding all entanglements that might involve the
young republic in foreign rivalries and foreign wars.  Only with the
impending shifts
in the European balance of power, and the growth of American economic
and industrial strength create a situation that made impossible a
continued aloofness from international affairs.
#create passage
   America's rise to world power is a consequence of the nation's
geographic position, natural resources, and dynamic energy.  For
the first century and more of national history, however, continental
expansion and internal developments largely absorbed the energies
of the American people.  Every dictate of public interest emphasized
the importance of avoiding all entanglements that might involve the
young republic in foreign rivalries and foreign wars.  Only with the
twentieth century did a rapidly contracting world, impending shifts
in the European balance of power, and the growth of American economic
and industrial strength create a situation that made impossible a
continued aloofness from international affairs.
#user
#cmp passage Ref
#log
#next
55.1a 10