Class RegexUtil


  • @Service
    public class RegexUtil
    extends Object
    Util class for comparing a string to a pattern
    • Method Detail

      • compare

        public static boolean compare​(String expected,
                                      String actual)
        Compare a string to a pattern
        Parameters:
        expected - used to create a regex pattern
        actual - string that should be matched
        Returns:
        true if string matches the pattern, otherwise false
      • reformatEscapeCharacter

        public static String reformatEscapeCharacter​(String str)
        Replaces escape characters
        Parameters:
        str - - String to be reformated
        Returns:
        String - either null if param null or reformated param string