Subversion Repositories wimsdev

Rev

Rev 11282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11282 Rev 11292
Line 2... Line 2...
2
tit:replace
2
tit:replace
3
type:$type_both
3
type:$type_both
4
syntax:!replace [internal] `s1' by `s2' in `string'\
4
syntax:!replace [internal] ``s1'' by ``s2'' in ``string''\
5
!replace `obj' `ident' by `s' in `string'
5
!replace ``obj'' ``ident'' by ``s'' in ``string''
6
mean:String manipulation. <p>\
6
mean:String manipulation. <p>\
7
  Under the first syntax, variable substitution is first done on `string'.\
7
  Under the first syntax, variable substitution is first done on ``string''.\
8
  Then all occurences of substring `s1' are replaced by `s2'. <br/>\
8
  Then all occurences of substring ``s1'' are replaced by ``s2''. <br/>\
9
  When the keyword `internal' is absent, the Linux utility `sed' is called to make the replacements,\
9
  When the keyword ``internal'' is absent, the Linux utility ``sed'' is called to make the replacements,\
10
  therefore regular expressions are accepted in `s1' and `s2'.\
10
  therefore regular expressions are accepted in ``s1'' and ``s2''.\
11
  Please refer to the man page of `sed' for details. </p><p>\
11
  Please refer to the man page of ``sed'' for details. </p><p>\
12
  Under the second syntax, `obj' can be `char', `word', `item' or `line'.\
12
  Under the second syntax, ``obj'' can be ``char'', ``word'', ``item'' or ``line''.\
13
  Then the word, item or line identified by `ident' in `string' is replaced\
13
  Then the word, item or line identified by ``ident'' in ``string'' is replaced\
14
  by `s', after variable substitutions. <br/>\
14
  by ``s'', after variable substitutions. <br/>\
15
  `ident' can be a string, in this case all objects (words, items or lines) matching `ident' \
15
  ``ident'' can be a string, in this case all objects (words, items or lines) matching ``ident'' \
16
  will be replaced. It can also be a number (positive or negative integer `n'), preceded\
16
  will be replaced. It can also be a number (positive or negative integer ``n''), preceded\
17
  by the word `number'. In this case the object number `n' will be replaced.\
17
  by the word ``number''. In this case the object number ``n'' will be replaced.\
18
  (In the case where n&lt;0, it is the last -n th object which is replaced.)\
18
  (In the case where n&lt;0, it is the last -n th object which is replaced.)\
19
  </p>
19
  </p>