Pull request #373: RED-3666: Added rule function Section containsRegEx
Merge in RED/redaction-service from RED-3666 to master * commit '404fd25be0e8ee20528c1f9491f85d8b695a2433': RED-3666: Added rule function Section containsRegEx
This commit is contained in:
commit
c963c7ac32
@ -240,6 +240,17 @@ public class Section {
|
||||
}
|
||||
|
||||
|
||||
@WhenCondition
|
||||
public boolean containsRegEx(@Argument(ArgumentType.STRING) String regEx, @Argument(ArgumentType.BOOLEAN) boolean patternCaseInsensitive){
|
||||
|
||||
var compiledPattern = Patterns.getCompiledPattern(regEx, patternCaseInsensitive);
|
||||
|
||||
var matcher = compiledPattern.matcher(text);
|
||||
|
||||
return matcher.find();
|
||||
}
|
||||
|
||||
|
||||
@WhenCondition
|
||||
public boolean rowEquals(@Argument(ArgumentType.STRING) String headerName, @Argument(ArgumentType.STRING) String value) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user