Java.Lang.String.Matches Method
Tests whether this string matches the given regularExpression.

Syntax

[Android.Runtime.Register("matches", "(Ljava/lang/String;)Z", "")]
public bool Matches (string expr)

Parameters

regularExpression
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
!:NoType:if the syntax of the supplied regular expression is not valid.
Java.Lang.NullPointerExceptionif regularExpression == null

Remarks

Tests whether this string matches the given regularExpression. This method returns true only if the regular expression matches the entire input string. A common mistake is to assume that this method behaves like String.Contains(ICharSequence); if you want to match anywhere within the input string, you need to add .* to the beginning and end of your regular expression. See Java.Util.Regex.Pattern.Matches(string, Java.Lang.ICharSequence).

If the same regular expression is to be used for multiple operations, it may be more efficient to reuse a compiled Pattern.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1