@Beta public final class RegexPatterns extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNegatedPattern(Pattern pattern)
Check if the specified
Pattern is the result of negatePatternString(String). |
static String |
negatePatternString(String pattern)
Create a
Pattern expression which performs inverted match to the specified pattern. |
public static boolean isNegatedPattern(Pattern pattern)
Pattern is the result of negatePatternString(String). This method
assumes the pattern was not hand-coded but rather was automatically-generated, such that its non-automated
parts come from XSD regular expressions. If this constraint is violated, this method may result false positives.pattern - Pattern to checkNullPointerException - if pattern is nullIllegalArgumentException - if the pattern does not conform to expected structurepublic static String negatePatternString(String pattern)
Pattern expression which performs inverted match to the specified pattern. The input pattern
is expected to be a valid regular expression passing Pattern.compile(String) and to have both start and
end of string anchors as the first and last characters.pattern - Pattern regular expression to negateIllegalArgumentException - if the pattern does not conform to expected structureNullPointerException - if pattern is nullCopyright © 2018 OpenDaylight. All rights reserved.