• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String replacAll is not working

 
sambasivarao laghuvarapu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to replace some string iam using the replaceAll method but it's not giving the proper output.can anyone explain what is the exact functionality of the string replaceAll method.

Thanks.
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take time to Carefully Choose One Forum when you start a topic. The servlet forum is not the correct forum for this question. I'll move it.
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's not giving the proper output


It doesn't work is not enough for anyone to help you. Please Tell The Details. You can read the documentation of String.replaceAll to know what it does...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String.replaceAll(...) has no effect on the original String.

String newString = oldString.replaceAll(...);

should work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic