Regex
Since Kotlin
1.2Represents 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.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 MDN RegExp and http://www.w3schools.com/jsref/jsref_obj_regexp.asp.
Note that RegExp objects under the hood are constructed with the "u" flag that enables Unicode-related features in regular expressions. This also makes the pattern syntax more strict, for example, prohibiting unnecessary escape sequences.
Since Kotlin
1.1Represents a compiled regular expression. Provides functions to match strings in text with a pattern, replace the found occurrences and split text around matches.
Since Kotlin
1.3Constructors
Creates a regular expression from the specified pattern string and the default options.
Creates a regular expression from the specified pattern string and the default options.
Creates a regular expression from the specified pattern string and the specified single option.
Creates a regular expression from the specified pattern string and the specified single option.
Creates a regular expression from the specified pattern string and the specified single option.
Creates a regular expression from the specified pattern string and the specified set of options.
Creates a regular expression from the specified pattern string and the specified set of options.
Creates a regular expression from the specified pattern string and the specified set of options.
Types
Functions
Indicates whether the regular expression can find at least one match in the specified input.
Indicates whether the regular expression can find at least one match in the specified input.
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 the first match of a regular expression in the input, beginning at the specified startIndex.
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
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.
Returns a sequence of all occurrences of a regular expression within the input string, beginning at the specified startIndex.
Returns a sequence of all occurrences of a regular expression within the input string, beginning at the specified startIndex.
Returns a sequence of all occurrences of a regular expression within the input string, beginning at the specified startIndex.
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 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 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.
Replaces the first occurrence 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.
Splits the input CharSequence to a list of strings around matches of this regular expression.
Splits the input CharSequence to a list of strings around matches of this regular expression.
Splits the input CharSequence to a list of strings around matches of this regular expression.