.\" 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.compile" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" Regex::compile \- Compile a regular expression .SH "SYNOPSIS" .B Regex compile( \fIString pattern, [REFlags] fl=createArray(1)\fP .B ")" .SH "ARGUMENTS" .PP .B "pattern" The regular expression pattern to compile .PP .B "fl" A list of .B "Regex.REFlags"(3kaya) options for the regular expression. This parameter is optional and defaults to the empty list. .SH "DESCRIPTION" .PP Compile a regular expression and return the compiled .B "Regex.Regex"(3kaya) This can then be re-used in several function calls for greater efficiency. .PP Note that if a literal backslash needs to be matched, it must be written as "\\\\\\\\" as both Kaya and PCRE will interpret one layer of backslashes. You can avoid this from Kaya 0.2.6 onwards by using a raw string instead. .IP "" -4 // these two are equivalent test1 = quickMatch("\\\\\\\\",string); test2 = quickMatch(R"\\\\",string); .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.match"(3kaya) .PP .B "Regex.quickMatch"(3kaya) .PP .B "Regex.replace"(3kaya) .PP .B "Regex.split"(3kaya) .PD 0.4v