-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8, 11, 17, 18, 19, 20
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The lookbehind section of a pattern can match text that comes before the start parameter
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the code from "Source code for an executable test case"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
false
---------- BEGIN SOURCE ----------
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test {
public static void main(String[] args) {
Pattern pattern = Pattern.compile("(?<=te)st");
Matcher matcher = pattern.matcher("test");
System.out.println(matcher.find(2));
}
}
---------- END SOURCE ----------
FREQUENCY : always
The lookbehind section of a pattern can match text that comes before the start parameter
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the code from "Source code for an executable test case"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
false
---------- BEGIN SOURCE ----------
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test {
public static void main(String[] args) {
Pattern pattern = Pattern.compile("(?<=te)st");
Matcher matcher = pattern.matcher("test");
System.out.println(matcher.find(2));
}
}
---------- END SOURCE ----------
FREQUENCY : always