filter number from Phone book by replacing all special characters in Android?
<p>I am working with the contacts fetched from my default Phone book in Android. When I fetch contacts from phone book, sometime I am getting "-", "(" etc characters. </p>

<p>If the characters are known then I can easily remove them with <strong>relpace()</strong> method but my client complaint that some times they got to see % like symbols too in the number fetch from phone book.</p>

<p>Please suggest me, how can I filter the numbers fetch from Phone book, so that I can have <strong>only and only digits</strong> in my text field and no else characters.</p>

<p>Currently I am using <code>string.replace("-","");</code> for removing '-' from the contact number.</p>
