Spark Shen 写道:
Hi All:
It seems that Matcher.region(int, int) will not have any effects when called. This can be demonstrated by the following test case:
public void test_RegionII() {
CharBuffer buffer = CharBuffer.wrap(new char[] { 'a', 'a', 'b', 'b',
'.', 'c' });

Matcher matcher = Pattern.compile("c").matcher(buffer); //$NON-NLS-1$
matcher.region(0, 2);
assertFalse(matcher.find());
}
This test case pass on RI, but fail on Harmony. Can I infer that, harmony ignores region settting when trying to find the specified pattern?
Correct me if I am wrong.

Best regards

BTW, there are other issues about java.util.regex. If necessary, can we disscuss all these issues case by case.

--
Spark Shen
China Software Development Lab, IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to