Java Matcher hasTransparentBounds() MethodThe 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. SyntaxReturns:true if this matcher is using transparent bounds, false otherwise. Since:1.5 Example 1Test it NowOutput: Has Transperent Bounds = true Example 2Test it NowOutput: 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 3Test it NowOutput: 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
|