Package org.apache.ofbiz.base.util
Class PatternFactory
java.lang.Object
org.apache.ofbiz.base.util.PatternFactory
A RegEx compiled pattern factory.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.oro.text.regex.Pattern
createOrGetPerl5CompiledPattern
(String stringPattern, boolean caseSensitive) Compiles and caches a Perl5 regexp pattern for the given string pattern.
-
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 stringcaseSensitive
- case sensitive true/false- Returns:
- a
Pattern
instance for the given string pattern - Throws:
org.apache.oro.text.regex.MalformedPatternException
-