Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: scan for phone numbers

by tstock (Curate)
on Mar 08, 2002 at 04:00 UTC ( #150220=note: print w/replies, xml ) Need Help??


in reply to scan for phone numbers

To follow up on that, I would come up with the best possible function I could come up with to normalize phone numbers, and start a test script that will test a list of phone numbers. As you feel the need to match weirder formats, edit your function to normalize them, run the test script to see if it still works for all cases and then add it to the application you are doing.

Also if the normalize_phone_number function is placed in a module you can use the Test.pm module to build your test script.

I think I would start by treating any non alphanumeric character as a separator, and substitute one or more separators by my normalized separator. then start from the right of the string, first separator after the 6 character is local number, next group is regional, and ... darn, forgot extensions. You're on your own :)

Tiago

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150220]
help
Chatterbox?
[Eily]: can't you just remote connect to the linux machine ?
[marto]: IIRC the hiemdal suite made life much easier on windows, and people on XDA developers put out released of windows only pages for adb that made it less of a pain
[marto]: Eily you can't remote connect the physical device via USB ;)
[Corion]: Eily: Sure, that's what I do, but some things you need to do on the Android device directly, like when navigating the bootloader :-)
[Eily]: marto you just need a longer cable :P
[Corion]: marto: Yeah, but I'm somewhat wary of installing random USB drivers downloaded from mega.nz , Google Drive or whatever, so Linux wins there due to there being no conflicts and me just having to edit one text file in the worst case, to add the USB vendor
[hippo]: Long USB cable FTW.
[Corion]: Eily: I've thought of that, but I don't like running long cables through the appartment because sooner or later I'll trip over it, pulling at least one device off its stand :)
[marto]: hmm, may have to patch CPAN::Meta to move from search.cpan to metacpan in the META.json/yml files
[Corion]: marto: Heh - it seems that they plan to keep the search.cpan.org links alive for a long time. But still, I plan on moving PM to use/generate the new links

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2018-05-23 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?