IN the python port that you link to, there is a PhoneNumberMatcher
class that provides the FindNumbers
functionality. The code is here.
From the project's README:
Sometimes, you've got a larger block of text that may or may not have
some phone numbers inside it. For this, the PhoneNumberMatcher object
provides the relevant functionality; you can iterate over it to
retrieve a sequence of PhoneNumberMatch objects. Each of these match
objects holds a PhoneNumber object together with information about
where the match occurred in the original string.
>>> text = "Call me at 510-748-8230 if it's before 9:30, or on 703-4800500 after 10am."
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
... print match
...
PhoneNumberMatch [11,23) 510-748-8230
PhoneNumberMatch [51,62) 703-4800500
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
... print phonenumbers.format_number(match.number, phonenumbers.PhoneNumberFormat.E164)
...
+15107488230
+17034800500