Replacing last comma in a string
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12806187/java-removing-semi-colon-from-a-string-if-the-string-ends-with-it">java - removing semi colon from a string if the string ends with it</a>  </p>
</blockquote>



<p>"Dear $contact_name$, </p>

<p>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.</p>

<p>Thank you,</p>

<p>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</p>
