Javatpoint Logo
Javatpoint Logo

Java Matcher hasAnchoringBounds() Method

The hasAnchoringBounds() Method of Matcher class enquirers the anchoring of region bounds for this matcher. If the matcher uses anchoring bounds, then it returns true otherwise false. The anchoring region boundaries are the default for a matcher.

Syntax

Returns:

true, if this matcher is using anchoring bounds, false otherwise.

Since:

1.5

Example 1

Test it Now

Output:

Has Anchoring Bounds true

Example 2

Test it Now

Output:

Has Anchoring Bounds true
 java.util.regex.Matcher[pattern=<java>* region=0,15 lastmatch=<java>]
Next TopicJava Matcher class




Help Others, Please Share

facebook twitter pinterest