Add deprecated matcher() method to Regex to fix build.

This commit is contained in:
Ilya Gorbunov
2015-04-11 03:04:08 +03:00
parent 5f4e3ae6af
commit 2ae767a049
@@ -103,6 +103,9 @@ public class Regex( /* visibility? */ public val nativePattern: Pattern) {
/** The set of options that were used to create this regular expression. */
public val options: Set<RegexOption> = fromInt(nativePattern.flags(), RegexOption.values())
deprecated("To get the Matcher from java.util.regex.Pattern use toPattern to convert string to Pattern, or migrate to Regex API")
public fun matcher(input: CharSequence): Matcher = nativePattern.matcher(input)
/** Indicates whether the regular expression matches the entire [input]. */
public fun matches(input: CharSequence): Boolean = nativePattern.matcher(input).matches()