Browse topics
Standard Library
Regular Expressions
Regex matching, find, replace and common patterns in Kotlin.
kotlin regexRegular Expression Basics in KotlinRegex class represents compiled regular expression pattern. A Kotlin example with source code and sample output.kotlin regexRegex Matching in Kotlinmatches checks full string match. A Kotlin example with source code and sample output.kotlin regexRegex Replace in Kotlinreplace function substitutes matched text with replacement string. A Kotlin example with source code and sample output.kotlin regexRegex find in Kotlinfind returns first match as MatchResult. A Kotlin example with source code and sample output.kotlin regexRegex Pattern Examples in KotlinCommon patterns include digits, words and email-like formats. A Kotlin example with source code and sample output.