-
Bug
-
Resolution: Fixed
-
P2
-
1.4.1
-
beta
-
sparc
-
solaris_7
-
Verified
\Z should treat a \u0085 at the end of input like a \n unless
unix lines is enabled.
Also
\G should really match where the last match occurred, not where
the next match starts.
test cases
import java.util.regex.*;
public class test1 {
public static void main(String [] args) {
Pattern p = Pattern.compile("foo\\Z");
Matcher m = p.matcher("foo\u0085");
if (m.matches())
System.out.println("matches");
else
System.out.println("fails");
}
}
should match.
Also
import java.util.regex.*;
public class test {
public static void main(String [] args) {
System.out.println(Pattern.compile("\\GA*")
.matcher("1A2AA3")
.replaceAll("X"));
}
}
should print "X1A2AA3".
unix lines is enabled.
Also
\G should really match where the last match occurred, not where
the next match starts.
test cases
import java.util.regex.*;
public class test1 {
public static void main(String [] args) {
Pattern p = Pattern.compile("foo\\Z");
Matcher m = p.matcher("foo\u0085");
if (m.matches())
System.out.println("matches");
else
System.out.println("fails");
}
}
should match.
Also
import java.util.regex.*;
public class test {
public static void main(String [] args) {
System.out.println(Pattern.compile("\\GA*")
.matcher("1A2AA3")
.replaceAll("X"));
}
}
should print "X1A2AA3".