assertk / assertk.assertions / matches

matches

(common, jvm) fun Assert<String>.matches(regex: Regex): Unit

Asserts the string matches the expected regular expression.