Solved

removing commas from the end of the string

Posted on 2006-07-06
2
277 Views
Last Modified: 2010-03-31
i am bit confuded that how could i remove commas appearing in random numbers as post fix of the String. like

I have strings like

abc,
abc,,,
yyyyy,,
rrrr,,,,,,,,,,,,,,,

above strings are being generated after a concatanation process...some how lots of commas appearing at the end..not a fix number though. Now i want to remove these so that i have strings like

abc
abc
yyyyy
rrrr
0
Comment
Question by:jaipur07
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 17051063
s = s.replaceAll(",+$", "");
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17051174
:-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unable to start eclipse ? 17 133
Java passing arguments (type error) 2 48
java jdbc batch example 8 22
eclipse apache tomcat admin console 52 66
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now