Hello guys I'm starting to learn regex and I want to replace some characters from string.
this is my test case:
Example string:
+52 924 340 2304
Expected output:
09243402304
This is what I've tried:
String number = cursor.getString(col_number).replace("\\d{2}", "");
But I can't seem to get my expected output. Any help? I would gladly appreciate your help. Thanks.
Update:
Also, I want to remove all whitespace characters from the string and I forgot to add if the string has other characters like (,),-
substring.