Javatpoint Logo
Javatpoint Logo

Java Matcher hasTransparentBounds() Method

The hasTransparentBounds() method of Matcher class checks the transparency of region bounds for the Matcher object. If the matcher uses transparent bounds, then it returns true otherwise false if it uses opaque bounds. The opaque region boundaries are the default.

Syntax

Returns:

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

Since:

1.5

Example 1

Test it Now

Output:

Has Transperent Bounds = true

Example 2

Test it Now

Output:

 Has Transperent Bounds = true
 java.util.regex.Matcher[pattern=<abc>* region=0,15 lastmatch=<abc>]
 java.util.regex.Matcher[pattern=<abc>* region=0,15 lastmatch=<abc>]

Example 3

Test it Now

Output:

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




Help Others, Please Share

facebook twitter pinterest