• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: easily search Address Book for phone numbers in various formats?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: easily search Address Book for phone numbers in various formats?


  • Subject: Re: easily search Address Book for phone numbers in various formats?
  • From: Chris Blättermann <email@hidden>
  • Date: Mon, 11 Feb 2008 16:18:23 +0100

Hi Steve!

A quick-and-dirty solution would be parsing out all the characters which are not numbers and start the search with the modified string. Like +808-555-1212 would become 8085551212. Then you loop through all the contacts, read out the number and convert it the same way. Comparing these two strings with isEqualToString:.

Another way would be regular expressions, but I'm not very good at it.

Kind regards,

Chris Blaettermann

Am 11.02.2008 um 12:06 schrieb Stephen Zyszkiewicz:

I'd like to use the Address Book framework to search for phone numbers in various formats. I would like to match up a phone number with a contact. The phone number may look like +808-555-1212 or 8085551212 or +8085551212. Is there any way to easily do this with the AB framework or perhaps someone has figured this out already?


Thank you!! Steve _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: easily search Address Book for phone numbers in various formats?
      • From: Brad Peterson <email@hidden>
References: 
 >easily search Address Book for phone numbers in various formats? (From: Stephen Zyszkiewicz <email@hidden>)

  • Prev by Date: Re: finding memory leaks
  • Next by Date: Re: Loading saved file into NSArrayController
  • Previous by thread: easily search Address Book for phone numbers in various formats?
  • Next by thread: Re: easily search Address Book for phone numbers in various formats?
  • Index(es):
    • Date
    • Thread