Java Matcher hasAnchoringBounds() MethodThe 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. SyntaxReturns:true, if this matcher is using anchoring bounds, false otherwise. Since:1.5 Example 1Test it NowOutput: Has Anchoring Bounds true Example 2Test it NowOutput: Has Anchoring Bounds true java.util.regex.Matcher[pattern=<java>* region=0,15 lastmatch=<java>]
Next TopicJava Matcher class
|