|
|
1.1 root 1: #print
2: You can of course use the [] operators anywhere in
3: a pattern. Editor patterns, by the way, are called
4: "regular expressions". For example, suppose you wanted
5: to change either the word "trick" or the word "track"
6: to "stop". What command would you need?
7: Do you see that
8:
9: s/tr[ia]ck/stop/p
10:
11: will do that? Now figure out what command you would
12: need to change either "bear" or "beat" into "best"
13: and print the line after the change.
14: Type "answer COMMAND" where COMMAND is that line.
15: #copyin
16: #user
17: #uncopyin
18: #match s/bea[rt]/best/p
19: #match s/bea[tr]/best/p
20: #match s/bea[rt]/best/
21: You forgot the "p" part.
22: #match s/bea[tr]/best/
23: You forgot the "p" part.
24: #log
25: #next
26: 33.2c 5
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.