Java-Use Logical Operators

Use Logical Operators You can use the && operator to combine classes that define sets of characters. This is particularly useful when you use it combined with the negation operator(^). For example, if you want to specify that any uppercase consonant is acceptable, you could write the expression that matches this as “[A-CG-IM-Z]{2}”. However, this … Read more…

Java-Wildcards with Quantifiers

Wildcards with Quantifiers A quantifier following a subsequence of a pattern determines the possibilities for how that subsequence of a pattern can repeat. Although the previous programs show the general technique for using Pattern and Matcher, they don’t show their power. The real benefit of regular expression processing is not seen until wildcards and quantifiers are … Read more…