Java Matcher lookingAt() methodThe lookingAt() method of Matcher class is used to match the input sequence against the beginning of the text. This method is similar to matches() except the difference that matches() match the regular expression against the whole text. Syntax:ParameterNo parameter Returnstrue if, and only if, a prefix of the input sequence matches this matcher's pattern Example 1Output: lookingAt = true Example 2Output: lookingAt = true matches = false Example 3Output: lookingAt = true java.util.regex.Matcher[pattern=java programm region=0,50 lastmatch=java programm] Next TopicJava-matcher-matches-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India