Class JdkRegexpMatcher

  • All Implemented Interfaces:
    RegexpMatcher

    public class JdkRegexpMatcher
    extends java.lang.Object
    implements RegexpMatcher
    JDK 1.4+ RegexpMatcher implementation.
    Author:
    Andres Almiray
    • Constructor Summary

      Constructors 
      Constructor Description
      JdkRegexpMatcher​(java.lang.String pattern)  
      JdkRegexpMatcher​(java.lang.String pattern, boolean multiline)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getGroupIfMatches​(java.lang.String str, int group)
      Returns the specified group if the string matches the Pattern.
      The Pattern will be managed internally by the RegexpMatcher implementation.
      boolean matches​(java.lang.String str)
      Returns true is the string macthes the Pattern.
      The Pattern will be managed internally by the RegexpMatcher implementation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JdkRegexpMatcher

        public JdkRegexpMatcher​(java.lang.String pattern)
      • JdkRegexpMatcher

        public JdkRegexpMatcher​(java.lang.String pattern,
                                boolean multiline)
    • Method Detail

      • getGroupIfMatches

        public java.lang.String getGroupIfMatches​(java.lang.String str,
                                                  int group)
        Description copied from interface: RegexpMatcher
        Returns the specified group if the string matches the Pattern.
        The Pattern will be managed internally by the RegexpMatcher implementation.
        Specified by:
        getGroupIfMatches in interface RegexpMatcher
      • matches

        public boolean matches​(java.lang.String str)
        Description copied from interface: RegexpMatcher
        Returns true is the string macthes the Pattern.
        The Pattern will be managed internally by the RegexpMatcher implementation.
        Specified by:
        matches in interface RegexpMatcher