다음을 통해 공유


Matcher.UsePattern(Pattern) Method

Definition

Changes the Pattern that this Matcher uses to find matches with.

[Android.Runtime.Register("usePattern", "(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;", "")]
public Java.Util.Regex.Matcher UsePattern (Java.Util.Regex.Pattern newPattern);
[<Android.Runtime.Register("usePattern", "(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;", "")>]
member this.UsePattern : Java.Util.Regex.Pattern -> Java.Util.Regex.Matcher

Parameters

newPattern
Pattern

The new pattern used by this matcher

Returns

This matcher

Attributes

Remarks

Changes the Pattern that this Matcher uses to find matches with.

This method causes this matcher to lose information about the groups of the last match that occurred. The matcher's position in the input is maintained and its last append position is unaffected.

Added in 1.5.

Java documentation for java.util.regex.Matcher.usePattern(java.util.regex.Pattern).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to