Class StringNormalizer.RegexNormalizerRule

    • Constructor Detail

      • RegexNormalizerRule

        public RegexNormalizerRule​(String displayName,
                                   String... patterns)
        Create a new regular expression rule using a series of pattern/replacement pairs. Each pattern/replacement will be applied globally (all matches that can be found). If multiple patterns are given, they will be applied in the order given. Use this form:
         myRule = new RegexNormalizerRule(
             "pattern1", "replacement1",
             "pattern2", "replacement2",
             ... // As many as you want
         );
         
        Parameters:
        patterns - a series of regular expression pattern/replacement pairs (there must be an even number!)
      • RegexNormalizerRule

        public RegexNormalizerRule​(String displayName,
                                   boolean everywhere,
                                   String... patterns)
        Create a new regular expression rule using a series of pattern/replacement pairs.
        Parameters:
        everywhere - True if all pattern/replacements should be applied globally (for every match), or false if the replacements should only be applied to the first match for each pattern.
        patterns - a series of regular expression pattern/replacement pairs (there must be an even number!)