1Regex.replaced(3kaya) Kaya module reference Regex.replaced(3kaya)
2
3
4
6 Regex::replaced - Replace a compiled pattern with a string.
7
9 String replaced( String key, String new, 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.
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. Returns a new string.
31
32 str may be a Tainted string. This function will return an untainted
33 string
34
36 Kaya standard library by Edwin Brady, Chris Morris and others
37 (kaya@kayalang.org). For further information see http://kayalang.org/
38
40 The Kaya standard library is free software; you can redistribute it
41 and/or modify it under the terms of the GNU Lesser General Public
42 License (version 2.1 or any later version) as published by the Free
43 Software Foundation.
44
46 Regex.compile (3kaya)
47 Regex.replace (3kaya)
48 Builtins.Tainted (3kaya)
49
50
51
52Kaya December 2010 Regex.replaced(3kaya)