On 13/11/2008, at 10:04 AM, Q wrote:
On 13/11/2008, at 6:19 AM, Lachlan Deck wrote:
So this will work for windows or unix styles. To also handle the
old styles of \r only... i.e., to transform files from any
platform this should work:
String comments = aListing.additionalComments().replace
String comments = aListing.additionalComments().replaceAll("\r\n",
"\n").replaceAll("\r", "\n").replaceAll("\n", "n");
That should work, albeit in not the most efficient manner.
I think we should all know by now that Q is basically always right on
matters of insane complexity :)
ms
___
On 13/11/2008, at 6:19 AM, Lachlan Deck wrote:
So this will work for windows or unix styles. To also handle the
old styles of \r only... i.e., to transform files from any
platform this should work:
String comments = aListing.additionalComments().replaceAll("(\r?
\n?){1,2}+", "n")
Hmm
On Nov 12, 2008, at 12:19 PM, Lachlan Deck wrote:
On 13/11/2008, at 2:10 AM, Q wrote:
On 12/11/2008, at 5:52 PM, Lachlan Deck wrote:
@see java.util.regex.Pattern
On 12/11/2008, at 5:37 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:33 AM, Q wrote:
String comments = aListing.additiona
On 13/11/2008, at 2:10 AM, Q wrote:
On 12/11/2008, at 5:52 PM, Lachlan Deck wrote:
@see java.util.regex.Pattern
On 12/11/2008, at 5:37 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:33 AM, Q wrote:
String comments = aListing.additionalComments().replaceAll("\r?
\n", "n")
That wo
String comments = aListing.additionalComments().replaceAll("(\r\n|
\r)", "n");
To achieve what lachlan was aiming for, ie. replace \r, \r\n or \n
with the string '\' + 'n', you would still need to match the \n case.
Oh, my bad ... he's actually ESCAPING it, not replacing with \n ...
That
On 13/11/2008, at 1:16 AM, Mike Schrag wrote:
String comments = aListing.additionalComments().replaceAll("(\r?\n|
\r)", "n");
Just to continue this discussion unnecessarily, but you might as
well drop the ? from this, right? You really only care about \r\n,
not bare \n's, so you could
String comments = aListing.additionalComments().replaceAll("(\r?\n|
\r)", "n");
Just to continue this discussion unnecessarily, but you might as well
drop the ? from this, right? You really only care about \r\n, not
bare \n's, so you could make it a little easier and just have:
String c
On 12/11/2008, at 5:52 PM, Lachlan Deck wrote:
@see java.util.regex.Pattern
On 12/11/2008, at 5:37 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:33 AM, Q wrote:
String comments = aListing.additionalComments().replaceAll("\r?
\n", "n")
That worked perfectly. Why is the question m
Thank you all very much for the pointers.
Awbrey
On Nov 12, 2008, at 1:52 AM, Lachlan Deck wrote:
@see java.util.regex.Pattern
On 12/11/2008, at 5:37 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:33 AM, Q wrote:
String comments = aListing.additionalComments().replaceAll("\r?
\n", "\
@see java.util.regex.Pattern
On 12/11/2008, at 5:37 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:33 AM, Q wrote:
String comments = aListing.additionalComments().replaceAll("\r?\n",
"n")
That worked perfectly. Why is the question mark there?
@see java.util.regex.Pattern
It means
Am 12.11.2008 um 07:37 schrieb Awbrey Hughlett:
On Nov 12, 2008, at 12:33 AM, Q wrote:
On 12/11/2008, at 4:24 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:14 AM, Richard Stephens wrote:
String comments = aListing.additionalComments().replaceAll("\n",
"\\n");
comments = aListing.
On Nov 12, 2008, at 12:33 AM, Q wrote:
On 12/11/2008, at 4:24 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:14 AM, Richard Stephens wrote:
String comments = aListing.additionalComments().replaceAll("\n",
"\\n");
comments = aListing.additionalComments().replaceAll("\r", "\\n");
Ar
On 12/11/2008, at 4:24 PM, Awbrey Hughlett wrote:
On Nov 12, 2008, at 12:14 AM, Richard Stephens wrote:
String comments = aListing.additionalComments().replaceAll("\n", "\
\n");
comments = aListing.additionalComments().replaceAll("\r", "\\n");
Are you sure you don't mean
String comments
On Nov 12, 2008, at 12:14 AM, Richard Stephens wrote:
String comments = aListing.additionalComments().replaceAll("\n", "\
\n");
comments = aListing.additionalComments().replaceAll("\r", "\\n");
Are you sure you don't mean
String comments = aListing.additionalComments().replaceAll("\n", "\
On Nov 11, 2008, at 11:46 PM, Chuck Hill wrote:
On Nov 11, 2008, at 3:39 PM, Awbrey Hughlett wrote:
I am trying to print out a text document with data from a CLOB in
Frontbase.
Print out, as in to an HTML page?
No, I am printing it out to a text document available for download as
in e
String comments = aListing.additionalComments().replaceAll("\n", "\
\n");
comments = aListing.additionalComments().replaceAll("\r", "\\n");
Are you sure you don't mean
String comments = aListing.additionalComments().replaceAll("\n", "\\n");
comments = comments.replaceAll("\r", "\\n");
But thi
On Nov 11, 2008, at 3:39 PM, Awbrey Hughlett wrote:
I am trying to print out a text document with data from a CLOB in
Frontbase.
Print out, as in to an HTML page?
In my code, I get the data and set it to a string value. What I want
to do is get rid of all line breaks and carriage return
t;
Sent: Wednesday, November 12, 2008 9:39 AM
Subject: Frontbase CLOB newline problem
I am trying to print out a text document with data from a CLOB in
Frontbase. In my code, I get the data and set it to a string value.
What I want to do is get rid of all line breaks and carriage returns.
So
I am trying to print out a text document with data from a CLOB in
Frontbase. In my code, I get the data and set it to a string value.
What I want to do is get rid of all line breaks and carriage returns.
So here is what I have tried and the results that follow:
String comments = aListing.ad
20 matches
Mail list logo