1Regex.replace(3kaya) Kaya module reference Regex.replace(3kaya)
2
3
4
6 Regex::replace - Replace a pattern with a string.
7
9 Void replace( String key, String new, var String str, [ReplaceFlags]
10 fl=createArray(1), [REFlags] mfl=createArray(1) )
11
13 key A pattern string
14
15 new The string to replace matches with
16
17 str The string to search for matches (will be edited in place).
18
19 fl A list of Regex.ReplaceFlags (3kaya) options. This parameter may be
20 omitted and defaults to the empty list.
21
22 mfl A list of Regex.REFlags (3kaya) options for compiling the pattern.
23 Ths parameter may be omitted and defaults to the empty list.
24
26 Replace the first match (or all matches if fl contains Global ) of key
27 with new in the String str
28
29 new may contain back references into the pattern, $1, $2, etc, which
30 stand for sub-matches.
31
33 Kaya standard library by Edwin Brady, Chris Morris and others
34 (kaya@kayalang.org). For further information see http://kayalang.org/
35
37 The Kaya standard library is free software; you can redistribute it
38 and/or modify it under the terms of the GNU Lesser General Public
39 License (version 2.1 or any later version) as published by the Free
40 Software Foundation.
41
43 Regex.compile (3kaya)
44 Regex.replace (3kaya)
45
46
47
48Kaya December 2010 Regex.replace(3kaya)