Here is the utility method we can add.
public static String normalizePhone(String initialString){
String resultNumber;
if(initialString != null){
resultNumber = initialString.replaceAll('[^0-9.]', '');
}
return resultNumber;
}
No comments:
Post a Comment