Rev 4562 | Rev 5920 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4562 | Rev 5766 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | $lst_tit replace$lst_titend$type_both |
2 | $lst_tit replace$lst_titend$type_both |
3 | $(lst_syntax)replace [internal] $emph s1 $emphend by $emph s2 $emphend in $emph |
3 | $(lst_syntax)replace [internal] $emph s1 $emphend by $emph s2 $emphend in $emph |
4 | string$emphend<br> |
4 | string$emphend<br/> |
5 | </tt>or <tt>!replace $emph obj$emphend $emph ident$emphend by |
5 | </tt>or <tt>!replace $emph obj$emphend $emph ident$emphend by |
6 | $emph s$emphend in $emph string$emphend</tt> |
6 | $emph s$emphend in $emph string$emphend</tt> |
7 | $lst_mean String manipulation. <p> |
7 | $lst_mean String manipulation. <p> |
8 | Under the first syntax, variable substitution is first done on |
8 | Under the first syntax, variable substitution is first done on |
9 | $emph string$emphend. Then all occurences of substring $emph s1$emphend |
9 | $emph string$emphend. Then all occurences of substring $emph s1$emphend |
10 | are replaced by $emph s2$emphend. <br> |
10 | are replaced by $emph s2$emphend. <br/> |
11 | When the keyword $emph internal $emphend is absent, |
11 | When the keyword $emph internal $emphend is absent, |
12 | the Linux utility $emph sed$emphend is called to make the replacements, |
12 | the Linux utility $emph sed$emphend is called to make the replacements, |
13 | therefore regular expressions are accepted in $emph s1$emphend and |
13 | therefore regular expressions are accepted in $emph s1$emphend and |
14 | $emph s2$emphend. Please refer to the man page of $emph sed$emphend for |
14 | $emph s2$emphend. Please refer to the man page of $emph sed$emphend for |
15 | details. <p> |
15 | details. <p> |
16 | Under the second syntax, $emph obj$emphend can be $emph char$emphend, |
16 | Under the second syntax, $emph obj$emphend can be $emph char$emphend, |
17 | $emph word$emphend, |
17 | $emph word$emphend, |
18 | $emph item$emphend or $emph line$emphend. Then the word, item or line |
18 | $emph item$emphend or $emph line$emphend. Then the word, item or line |
19 | identified by $emph ident$emphend in $emph string$emphend is replaced |
19 | identified by $emph ident$emphend in $emph string$emphend is replaced |
20 | by $emph s$emphend, after variable substitutions. <br> |
20 | by $emph s$emphend, after variable substitutions. <br/> |
21 | $emph ident$emphend can be a string, in this case all objects |
21 | $emph ident$emphend can be a string, in this case all objects |
22 | (words, items or lines) matching |
22 | (words, items or lines) matching |
23 | $emph ident$emphend will be replaced. It can also be a number (positive or |
23 | $emph ident$emphend will be replaced. It can also be a number (positive or |
24 | negative integer $emph n$emphend), preceded |
24 | negative integer $emph n$emphend), preceded |
25 | by the word $emph number$emphend. In this case the object |
25 | by the word $emph number$emphend. In this case the object |