Regex
Since Kotlin
1.0Represents a compiled regular expression. Provides functions to match strings in text with a pattern, replace the found occurrences and split text around matches.
For pattern syntax reference see Pattern.
Since Kotlin
1.0Constructors
Creates a regular expression from the specified pattern string and the default options.
Types
Properties
Functions
Indicates whether the regular expression can find at least one match in the specified input.
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Returns a sequence of all occurrences of a regular expression within the input string, beginning at the specified startIndex.
Attempts to match the entire input CharSequence against the pattern.
Replaces all occurrences of this regular expression in the specified input string with the result of the given function transform that takes MatchResult and returns a string to be used as a replacement for that match.
Replaces all occurrences of this regular expression in the specified input string with specified replacement expression.
Replaces the first occurrence of this regular expression in the specified input string with specified replacement expression.