View RSS Feed

Recent Blogs Posts

  1. Using Regular Expressions with String.matches()

    by , 04-26-2012 at 07:44 PM
    Built in support is provided by Strings present in Java for the regular expressions. There are 3 built in methods present in Strings for regular expressions. For example: replace(), split() and matches().

    There is no optimization of methods for performance. Classes will be used later on, which are performance optimized.

    s.matches("regex"): Evaluates if "regex" matches s. Returns only true if the WHOLE string can be matched
    s.split("regex") ...