Class RegexUtil

java.lang.Object
de.ikor.sip.foundation.testkit.util.RegexUtil

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

    • 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 or if both are blank, 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 reformatted param string