Java Regex : Java Regex and regular expression is an API which define pattern for searching or manipulating strings. It provides following classes and interface for regular expression. (i) MatcherResult Interface (ii) Matcher class (iii) Pattern class (iv) PatternSyntaxExeption class Matcher class implements MatcherResult Interface which contains following methods. (i) boolean matches() : test […]
10
Oct 2016
10
Oct 2016
Regex Character Classes : [abc] : a,b or c characters only [^abc] : Any character except a, b or c character. [a-zA-Z] : a through z or A through Z, inclusive range. [a-d[m-p]] : a through d or m through p [a-z&&[def]] : d, e or f intersection. [a-z&&[^bc]] : a through z except b […]
10
Oct 2016
List of methods which present in String class. 1. char charAt(int index) return character from the specified index position. 2. int compareTo(Object o) Compare string with another object. 3. int compareTo(String anotherString) Compare two strings and return integer output 1 means first string is greater than second string, -1 means first string is less than second string, […]