Functions
Link copied to clipboard
Link copied to clipboard
Escapes the special characters used for regular expressions in @string, for instance "a.b*c" becomes "a\.b\*c". This function is useful to dynamically generate regular expressions.
Link copied to clipboard
fun matchSimple(pattern: String, string: String, compileOptions: RegexCompileFlags, matchOptions: RegexMatchFlags): Boolean
Scans for a match in @string for @pattern.
Link copied to clipboard
fun splitSimple(pattern: String, string: String, compileOptions: RegexCompileFlags, matchOptions: RegexMatchFlags): List<String>
Breaks the string on the pattern, and returns an array of the tokens. If the pattern contains capturing parentheses, then the text for each of the substrings will also be returned. If the pattern does not match anywhere in the string, then the whole string is returned as the first token.