[Bug 78] New: String.replaceAll() escaping incompatible w/ specs
| Newsgroups | gmane.comp.java.vm.sablevm.bugs |
|---|---|
| Message-ID | <[email protected]> |
http://sablevm.org/bugs/show_bug.cgi?id=78
Summary: String.replaceAll() escaping incompatible w/ specs
Product: SableVM
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: default
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Consider this call:
s = s.replaceAll("\n", "\\\\n");
On Sun's JVM it will change all newlines into "\n" strings, while w/ SableVM
and GNU Classpath it will change all newlines into "\\n" strings.
OTOH this call:
s = s.replaceAll("\n", "\\n");
on Sun's JVM will not change the content of string s as all newlines will get
changed into... nelines. But on SableVM it _will_ change newlines into "\n"
strings.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#sum
http://www.regular-expressions.info/java.html
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.