regex

infix fun KProperty<String?>.regex(regex: String): Bson
infix fun KProperty<String?>.regex(regex: Pattern): Bson
@JvmName(name = "regexIterable")
infix fun KProperty<Iterable<String?>>.regex(regex: String): Bson
@JvmName(name = "regexIterable")
infix fun KProperty<Iterable<String?>>.regex(regex: Pattern): Bson

Creates a filter that matches all documents where the value of the property matches the given regular expression pattern.

Return

the filter

Parameters

pattern

the pattern


fun KProperty<String?>.regex(pattern: String, options: String): Bson
@JvmName(name = "regexIterable")
fun KProperty<Iterable<String?>>.regex(pattern: String, options: String): Bson

Creates a filter that matches all documents where the value of the option matches the given regular expression pattern with the given options applied.

Return

the filter

Parameters

pattern

the pattern

options

the options


infix fun KProperty<String?>.regex(regex: Regex): Bson
@JvmName(name = "regexIterable")
infix fun KProperty<Iterable<String?>>.regex(regex: Regex): Bson

Creates a filter that matches all documents where the value of the property matches the given regular expression pattern.

Return

the filter

Parameters

regex

the regex