Created
December 14, 2017 22:02
-
-
Save danemacaulay/f53d7213458c5b3a8994061b4c697b1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set<String> phones = new HashSet<>(); | |
PhoneNumberUtil util = PhoneNumberUtil.getInstance(); | |
Iterator<PhoneNumberMatch> iterator = util.findNumbers(source, null).iterator(); | |
while (iterator.hasNext()) { | |
phones.add(iterator.next().rawString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment