title: How to remove all type of prefix salutation from string in java?
body: <p>Suppose I have string coming from Input with name (for eg: <code>Mr . Aditya Jha</code>). How do I remove salutation from the start of input?</p>
  
  <p>List of salutations that can come are:</p>
  
  <pre><code>Mr, Mrs, Dr, Miss, Ms, Rev, Mr. , Mr. , Dr. , Miss. , Ms. , Rev. , Mr . , Mr . , Dr . , Miss . , Ms . , Rev .
  </code></pre>
  
  <p>Any solution or regex statement which can consider all of these salutations? </p>
  
  <p>I tried this:</p>
  
  <pre><code>name.replaceAll("\\s{2,}", " ").replaceFirst("(?i)(Mr . )", "").replaceFirst("(?i)(Mr |Mr. )", "").trim()
  </code></pre>
  
  <p>It is working, but for name like <code>amra khan</code>, it is removing <code>mr</code>.</p>