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 comments = aListing.additionalComments().replaceAll("(\r\n| \r)", "\\\\n");

As an aside, I love the escaping that is required in the Java regex. It's mostly ridiculous.

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to