Share via


Matcher.UseAnchoringBounds(Boolean) Method

Definition

Sets the anchoring of region bounds for this matcher.

[Android.Runtime.Register("useAnchoringBounds", "(Z)Ljava/util/regex/Matcher;", "")]
public Java.Util.Regex.Matcher UseAnchoringBounds (bool b);
[<Android.Runtime.Register("useAnchoringBounds", "(Z)Ljava/util/regex/Matcher;", "")>]
member this.UseAnchoringBounds : bool -> Java.Util.Regex.Matcher

Parameters

b
Boolean

a boolean indicating whether or not to use anchoring bounds.

Returns

this matcher

Attributes

Remarks

Sets the anchoring of region bounds for this matcher.

Invoking this method with an argument of true will set this matcher to use anchoring bounds. If the boolean argument is false, then non-anchoring bounds will be used.

Using anchoring bounds, the boundaries of this matcher's region match anchors such as ^ and $.

Without anchoring bounds, the boundaries of this matcher's region will not match anchors such as ^ and $.

By default, a matcher uses anchoring region boundaries.

Added in 1.5.

Java documentation for java.util.regex.Matcher.useAnchoringBounds(boolean).

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