.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "Regex.replace" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" Regex::replace \- Replace a compiled pattern with a string. .SH "SYNOPSIS" .B Void replace( \fIRegex keyre, String new, var String str, [ReplaceFlags] fl=createArray(1)\fP .B ")" .SH "ARGUMENTS" .PP .B "keyre" A compiled regular expression .PP .B "new" The string to replace matches with .PP .B "str" The string to search for matches (will be edited in place). .PP .B "fl" A list of .B "Regex.ReplaceFlags"(3kaya) options. This parameter may be omitted and defaults to the empty list. .SH "DESCRIPTION" .PP Replace the first match (or all matches if \fBfl \fP contains \fBGlobal \fP ) of \fBkey \fP with \fBnew \fP in the String \fBstr \fP \fBnew \fP may contain back references into the pattern, $1, $2, etc, which stand for sub-matches. .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. .SH "RELATED" .PD 0 .PP .B "Regex.compile"(3kaya) .PP .B "Regex.replace_1"(3kaya) .PD 0.4v