blob: 85d520eeca079da13c4a9d21c2cd8ad7e21530c6 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001NAME
2 ed2
3
4DESCRIPTION
5 Substitutions are very advanced.
6
7 First a simple example:
8
9 s/apa/bepa/
10 This will substitue the 'apa' in current line to 'bepa'.
11 If an 'p' is appended, you will also immediately see the result.
12
13 1,$s/apa/bepa/
14 Same, but all lines in file. Only first occurence on every line.
15
16 Any character can used instead of '/':
17 s!apa!bepa!g
18 The 'g' specifies that all occurences of apa on this line are
19 changed to bepa.
20
21 The pattern that are supposed to be replaced, can be a regular
22 expression. See ed3 about that.
23
24SEE ALSO
25 ed3(LPC)