Bye,
Nicola
Bye,
Nicola
Bye,
Nicola
Hemil Shah wrote:That is dynamically generated by parsing through XML file. XML file is generated on Unix server and i am parsing it by putting on Windows.
Henry Wong wrote:
Use this...instead of using the system property. Unix uses a line feed as the separator, while windows uses the carriage return and line feed combination. This is not normally an issue because the Java println code does a good job and accounting for the difference. The regex stuff doesn't account for this, so it will need to be correct.
Winston Gutkowski wrote:
str = str.replaceAll("\r?\n", " ");
should work for one from any OS.
Jeff Verdegan wrote:Did Mac change its line terminator from \r to \n when it went Unix-based with OS X?
Winston Gutkowski wrote:
Jeff Verdegan wrote:Did Mac change its line terminator from \r to \n when it went Unix-based with OS X?
You know what? I have no idea. Unfortunately, I don't have any Macs lying around to test it with (can't afford 'em ).
Campbell Ritchie wrote:What about [\n\r]+ ?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Goodbye moon men. Hello tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|