1 | Perl5Matcher localMatcher = JMeterUtils.getMatcher();↵ | | 1 | Perl5Matcher localMatcher = JMeterUtils.getMatcher();↵
|
2 | // The headers and body are divided by a blank line (the \r is to allow for the CR before LF)↵ | | 2 | // The headers and body are divided by a blank line↵
|
3 | String regularExpression = "^\\r$"; // $NON-NLS-1$↵ | | 3 | String regularExpression = "^.$"; ↵
|
4 | Pattern pattern = JMeterUtils.getPattern(regularExpression, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.MULTILINE_MASK);↵ | | 4 | Pattern pattern = JMeterUtils.getPattern(regularExpression, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.MULTILINE_MASK);↵
|
5 | ↵ | | 5 | ↵
|
6 | PatternMatcherInput input = new PatternMatcherInput(stringToCheck);↵ | | 6 | PatternMatcherInput input = new PatternMatcherInput(stringToCheck);↵
|
7 | if(localMatcher.contains(input, pattern)) {↵ | | 7 | while(localMatcher.contains(input, pattern)) {↵
|
8 | MatchResult match = localMatcher.getMatch();↵ | | 8 | MatchResult match = localMatcher.getMatch();↵
|
9 | return match.beginOffset(0);↵ | | 9 | return match.beginOffset(0);↵
|
10 | }↵ | | 10 | }↵
|
11 | // No divider was found↵ | | 11 | // No divider was found↵
|
12 | return -1; | | 12 | return -1;
|