Class PatternFactory

java.lang.Object
org.apache.ofbiz.base.util.PatternFactory

public class PatternFactory extends Object
A RegEx compiled pattern factory.
  • Constructor Details

    • PatternFactory

      public PatternFactory()
  • Method Details

    • createOrGetPerl5CompiledPattern

      public static org.apache.oro.text.regex.Pattern createOrGetPerl5CompiledPattern(String stringPattern, boolean caseSensitive) throws org.apache.oro.text.regex.MalformedPatternException
      Compiles and caches a Perl5 regexp pattern for the given string pattern. This would be of no benefits (and may bloat memory usage) if stringPattern is never the same.
      Parameters:
      stringPattern - a Perl5 pattern string
      caseSensitive - case sensitive true/false
      Returns:
      a Pattern instance for the given string pattern
      Throws:
      org.apache.oro.text.regex.MalformedPatternException