title: How to clean a string from non-alphanumeric characters, but keep certain ones?
body: <p>I have a string that has non-alphanumeric characters, this string contains English and non English alphabets. I need to clean the string from non-alphanumeric characters, but I want to keep some of them. For instance: Let's say that I want to keep comma and colon only.</p>
  <p>Example:
  <code>String st = &quot;I, Love: ( Coding {}+-), codificación&quot;</code></p>
  <p>I want the output to be <code>&quot;I,Love:Coding,codificación&quot;</code></p>
  <p>Is there a regex that can do that?</p>
  <p>Note the method below will clean the text from all non-alphanumeric characters.</p>
  <pre><code>public static String cleanText(String text) {
       return text.replaceAll(&quot;\\P{LD}+&quot;, &quot;&quot;);
  }
  </code></pre>