BSD 4_1_snap development
[unix-history] / usr / lib / learn / editor / L54.1b
CommitLineData
3eb5d546
C
1#print
2The fact that the system remembers the last regular expression
3it had is particularly useful when the regular expression is
4complex. Suppose, for example, you know that the
5words "first" and "second" appear on the same line and you wish
6to delete them and everything between them. You could write
7 /first.*second/s/first.*second//p
8but isn't it easier to do
9 /first.*second/s///p
10Edit the file "passage"; the words "twentieth" and "impending" appear
11on the same line. Replace them and everything between
12them by the word "impending" (i.e. delete from "twentieth"
13up to but not including "impending"). One command, if you can.
14Then rewrite the file and type ready.
15#create Ref
16 America's rise to world power is a consequence of the nation's
17geographic position, natural resources, and dynamic energy. For
18the first century and more of national history, however, continental
19expansion and internal developments largely absorbed the energies
20of the American people. Every dictate of public interest emphasized
21the importance of avoiding all entanglements that might involve the
22young republic in foreign rivalries and foreign wars. Only with the
23impending shifts
24in the European balance of power, and the growth of American economic
25and industrial strength create a situation that made impossible a
26continued aloofness from international affairs.
27#create passage
28 America's rise to world power is a consequence of the nation's
29geographic position, natural resources, and dynamic energy. For
30the first century and more of national history, however, continental
31expansion and internal developments largely absorbed the energies
32of the American people. Every dictate of public interest emphasized
33the importance of avoiding all entanglements that might involve the
34young republic in foreign rivalries and foreign wars. Only with the
35twentieth century did a rapidly contracting world, impending shifts
36in the European balance of power, and the growth of American economic
37and industrial strength create a situation that made impossible a
38continued aloofness from international affairs.
39#user
40#cmp passage Ref
41#log
42#next
4355.1a 10