Class RegexUtil


  • public class RegexUtil
    extends Object
    Compatibility class used to bridge the gap between Java and JavaScript with respect to working with regular expressions.
    Author:
    eric.wittmann@gmail.com
    • Constructor Detail

      • RegexUtil

        public RegexUtil()
    • Method Detail

      • matches

        public static boolean matches​(String value,
                                      String regex)
        Returns true if the given value matches the given regular expression.
        Parameters:
        value -
        regex -
      • findMatches

        public static List<String[]> findMatches​(String value,
                                                 String regex)
        Finds all strings within the given input that match the given regular expression. Returns all matches, with each match represented as a list of the groups specified in the regex.
        Parameters:
        value -
        regex -