Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

replceAll function is not able to replace \r\r from my string

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Facing problem while replacing \r\r (four chars - \,r,\,r) chars from a string with \r\n.

I am working with an application where I make a request to webservice it returns me a bodyText.
In the bodyText the String contains \r\r chars (4 chars) and when I tried to replace them with \r\n
2 chars using replaceAll function it does not replace it. Strange..

When tried to create string using below way then replace all does not work.



I got the solution but looking for the standard solution.
Help is higly appriciated.

Regards,
PP.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic