RED-3666: Added rule function Section containsRegEx
This commit is contained in:
parent
efd53066c4
commit
404fd25be0
@ -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
|
@WhenCondition
|
||||||
public boolean rowEquals(@Argument(ArgumentType.STRING) String headerName, @Argument(ArgumentType.STRING) String value) {
|
public boolean rowEquals(@Argument(ArgumentType.STRING) String headerName, @Argument(ArgumentType.STRING) String value) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user