find
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.0Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.
Samples
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.1Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.
Samples
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.0Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.
Samples
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.3Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.
Samples
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.8Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.
Samples
Returns the first match of a regular expression in the input, beginning at the specified startIndex.
Since Kotlin
1.8Return
An instance of MatchResult if match was found or null
otherwise.
Parameters
An index to start search with, by default 0. Must be not less than zero and not greater than input.length()
Throws
if startIndex is less than zero or greater than the length of the input char sequence.