Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

carriage return replace in string

 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to replace end of line characters ('\n') with html breaks (br).
However, I'm stuck using jdk 1.3.1, so I don't have the luxury of regex.
Any quick and dirty low tech ideas out there?
Chris
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Must be a low brain power day - I solved my issue as I posted it.
I just move the string to a string buffer, in which I can do the replace, then do toString for output.
Thanks for listening.
Chris
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem . Glad we could be so helpful .
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been another episode of JavaRanch playing the role of the Cardboard Analyst.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic