Building an application for UK & Ireland only but potentially it might extend to other countries. We have built an API and I'm trying to decided how A) to store phone numbers B) how to write a parser to understand all formats for entry and comparision.
e.g.
Say a user is in Ireland they add a phone number in these formats
0871231234
087 123 1234
087-1231234
+353871231234
Or any other combination of writing a number a valid way. We want to allow for this so a new number can be added to our database in a consistent way
So all the numbers above potentially would be stored as 00353871231234
The problem is I will need to do parsing for all uk as well. Are there any classes out there that can help with this process?