Class RegexReplacement

    • Method Detail

      • format

        public String format​(String msg)
        Perform the replacement.
        Parameters:
        msg - The String to match against.
        Returns:
        the replacement String.
      • createRegexReplacement

        @PluginFactory
        public static RegexReplacement createRegexReplacement​(@PluginAttribute("regex")
                                                              Pattern regex,
                                                              @PluginAttribute("replacement")
                                                              String replacement)
        Create a RegexReplacement.
        Parameters:
        regex - The regular expression to locate.
        replacement - The replacement value.
        Returns:
        the new RegexReplacement instance or null if an input parameter was invalid