Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8910203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:37:42+00:00 2026-06-15T03:37:42+00:00

I have been tasked with the impossible, maybe? I have a table with telephone

  • 0

I have been tasked with the impossible, maybe?

I have a table with telephone numbers. But they are manually entered, and very dirty.

Example:

0711112399
07 1111 3288
07 1111 4832 NIKKI
0711117929
0711113616X123
0
NULL
1300 111 782

.

(Numbers changed to protect the innocent. :))

I need to break these into
CountryCode
AreaCode
Number
Extension

So, 0711112399 would become
CountryCode = +61 (Because there is no code on this number)
AreaCode = 07
Number = 11112399
Extension = NULL

11113616X123 would be
Country +61
AreaCode = NULL
Number = 11113616
Extension = 123

Rules are:

Possible area codes:

02 03 04 07 08

Is this even possible?

For 07 1111 4832 NIKKI – I will remove Alpha Numerics, unless it’s an X between 2 numbers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:37:43+00:00Added an answer on June 15, 2026 at 3:37 am

    You can try this

    ^(00\d{2}|\+\d{2})?(0\d)?([\d ]+)(?:[xX](\d+))?
    

    See it here on Regexr. You can see the content of the groups while hovering over the blue highlighted matches.

    It will put the country code in Group1, the area code in group 2, the number in group 3 and the extension in group 4. All parts are optional except the number. When a part is not found, the value of the group is not set, you have to put your default values then.

    I see a problem for the country code. It is hardcoded here with 2 digits, but I know there are also countries with a 3 digit code. For the countries with a 1 digit code, I am not sure, could be that there is a leading 0 then. But I need this to know when the area code/the number is starting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok - have been tasked with possibly an impossible ( or at least a
I have been tasked to send data to a 3rd Party web service, they
I have been tasked with converting some scripts referencing an Informix database to be
I have been tasked with porting a large Java codebase to the Android platform.
I have been tasked with refactoring some components that used xmlbeans to now make
I have been tasked to develop an interactive website using java & mysql: using
I have been tasked to create a form designer application in Windows Forms. The
I have been tasked with securing the connection string in an classic ASP application
I have been tasked with automating our build process with msbuild. We have about
I have been tasked with designing my web services client code to use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.