Class RegexpUtils


  • public class RegexpUtils
    extends java.lang.Object
    Convenience utility for working withRegexpMatcher.
    Author:
    Andres Almiray
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RegexpMatcher getMatcher​(java.lang.String pattern)
      Returns a RegexpMatcher that works in a specific environment.
      When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher.
      static RegexpMatcher getMatcher​(java.lang.String pattern, boolean multiline)
      Returns a RegexpMatcher that works in a specific environment.
      When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher.
      static boolean isJDK13()
      Queries the environment for the supported JDK version.
      • Methods inherited from class java.lang.Object

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

      • getMatcher

        public static RegexpMatcher getMatcher​(java.lang.String pattern)
        Returns a RegexpMatcher that works in a specific environment.
        When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher.
      • getMatcher

        public static RegexpMatcher getMatcher​(java.lang.String pattern,
                                               boolean multiline)
        Returns a RegexpMatcher that works in a specific environment.
        When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher.
      • isJDK13

        public static boolean isJDK13()
        Queries the environment for the supported JDK version.