Possible Duplicate:
java - removing semi colon from a string if the string ends with it
"Dear $contact_name$,
Your job posting for $job_title$ has been submitted to the following job boards as Free Job Boards $Free_Job_Boards$, $paid_job_boards$. Each job board can take up to 48 hours to process the request.
Thank you,
Here i want to remove comma after $Free_Job_Boards$ when there is no paid jobs. when i use content=content.replaceAll(" ,","") then comma after $contact_name$ also removed