title: Replace number and email with XXXX in a sentence using jQuery
body: <p>I'd like to replace the numbers and email from the sentences.</p>
  
  <p><strong>Example</strong></p>
  
  <p>$message = "Hi this is john, my personal no is 1213456789 and my email address is john@gmail.com".</p>
  
  <p><em>Output:</em></p>
  
  <blockquote>
    <p>Hi this is john, my personal no is 1213456789 and my email address is john@gmail.com</p>
  </blockquote>
  
  <p>I want the Output to be like this:</p>
  
  <p><em>Output:</em> </p>
  
  <blockquote>
    <p>Hi this is john, my personal no is XXXXXXX789 and my email address is XXXX@gmail.com</p>
  </blockquote>
  
  <p><em>But I'm currently getting like this :</em></p>
  
  <blockquote>
    <p>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@gmail.com</p>
  </blockquote>
  
  <p>function which I'm using now</p>
  
  <pre><code>function numbers1($str)
  {
   if(($until = strpos($str, '@')) !== false)
   {
    $str = str_repeat('X', $until) . substr($str, $until);
   }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>