if(includeExp != null && includeExp.length() > 0) {
if(log.isDebugEnabled()) {
log.debug("Include expression : " + includeExp);
}
Pattern pattern = null;
try {
pattern = JMeterUtils.getPatternCache().getPattern(includeExp, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.SINGLELINE_MASK);
if(!JMeterUtils.getMatcher().contains(sampleContentType, pattern)) {
return false;
}
} catch (MalformedCachePatternException e) {
log.warn("Skipped invalid content include pattern: " + includeExp, e);
}
}
// Check if the exclude pattern is mathed
if(excludeExp != null && excludeExp.length() > 0) {
if(log.isDebugEnabled()) {
log.debug("Exclude expression : " + excludeExp);
}
Pattern pattern = null;
try {
pattern = JMeterUtils.getPatternCache().getPattern(excludeExp, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.SINGLELINE_MASK);
if(JMeterUtils.getMatcher().contains(sampleContentType, pattern)) {
return false;
}