Javatpoint Logo
Javatpoint Logo

Java Matcher useTransparentBounds() Method

The useTransparentBounds(boolean b) method of Matcher class is used to set the transparency of the region bounds for this matcher. If the parameter is true then it will set this matcher to use transparent bounds otherwise the opaque bounds will be used. By default, a matcher uses opaque bounds.

Syntax

Parameters

b - a boolean indicating whether to use opaque or transparent regions

Returns

this matcher

Since

1.5

Example 1

Test it Now

Output of the above program:

true

Example 2

Test it Now

Output of the above program:

true
  java.util.regex.Matcher[pattern=^<abc> region=0,15 lastmatch=<abc>]

Example 3

Test it Now

Output of the above program:

true
  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




Help Others, Please Share

facebook twitter pinterest