Class RegexHelper


  • public class RegexHelper
    extends java.lang.Object
    Provides Regular expression helper methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean match​(java.lang.String regex, java.lang.String str)
      Matches a string.
      static Value query​(java.lang.String regex, java.lang.String str)
      Extracts a substring using a regular expression.
      • Methods inherited from class java.lang.Object

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

      • match

        public static boolean match​(java.lang.String regex,
                                    java.lang.String str)
        Matches a string.
        Parameters:
        regex - the regular expression
        str - the input string
        Returns:
        true if matches, false otherwise
      • query

        public static Value query​(java.lang.String regex,
                                  java.lang.String str)
        Extracts a substring using a regular expression.
        Parameters:
        regex - the regular expression
        str - the input string
        Returns:
        an instance of StringValue