Subversion Repositories wimsdev

Rev

Rev 11210 | Rev 11282 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
32 reyssat 1
!! +exec+ +var+ +string+
11210 bpr 2
tit:replace
3
type:$type_both
11212 bpr 4
syntax:!replace [internal] `s1' by `s2' in `string'\
5
!replace `obj' `ident' by `s' in `string'
11210 bpr 6
mean:String manipulation. <p>\
7
  Under the first syntax, variable substitution is first done on `string'.\
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,\
10
  therefore regular expressions are accepted in `s1' and `s2'.\
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'.\
13
  Then the word, item or line identified by `ident' in `string' is replaced\
14
  by `s', after variable substitutions. <br/>\
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\
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.)\
5920 bpr 19
  </p>