If you are using phone numbers as identifiers, you must pre-process or normalize the numbers before passing them to the ATS SDK to get the best match rate. Follow our recommendations below to learn how.
Validate the phone numbers against the following RegEx:
private static final Pattern ALFA_NUMERICS_PATTERN = Pattern.compile("[^0-9]"); private static final Pattern LEADING_ZEROS_PATTERN = Pattern.compile("^0+(?!$)");
Use the following command to remove non-numerical characters from phone numbers:
phoneNumber = ALFA_NUMERICS_PATTERN.matcher(phoneNumber).replaceAll("");
Use the following command to remove non-numerical characters from phone numbers if it exists:
phoneNumber = LEADING_ZEROS_PATTERN.matcher(phoneNumber).replaceFirst("");
Updated 2 months ago