Function to extract a phone number of an address?

Hello

I need to implement a function that is capable of extracts a U.S. / Canada phone number (in a variety of formats) from an address.
For example, I need to extract the telephone number of a string like:

Mr. A. Johnson
J & son Inc.
123 front st.
Tel.: 613-123-1234 ext.216

The function should return * (613) - 123-1234 *.

Any help will be greatly appreciated.

Kind regards
Mr. Rusu
SQL> select  regexp_substr ( address
              , '[(]?'    || -- 0 or 1 left brackets
              '[0-9]{3}'    || -- 3 digits
                '[). -]*'    || -- 0 or more separator characters
            '[0-9]{3}'    || -- 3 digits
                '[. -]*'    || -- 0 or more separator characters
            '[0-9]{4}'       -- 4 digits
              )  as phone_number
from (
  select '123 456-7890 ext.216' address from dual  union all
  select '(123) 456-7890 ext.216' address from dual
)
/
PHONE_NUMBER
----------------------
123 456-7890
(123) 456-7890        

2 rows selected.

Tags: Database

Similar Questions

  • find the phone number in the address book

    Hello
    Sometimes I need to search for a phone number in my address book to verify its existence. Is this possible?
    Thank you

    Edit(or AppMenu)/search/search for addresses, enter the numbers as in the photo.

  • I recently had my computer repaired by "pcfixit4u" who entered their phone number and email address on my hotmail account page. How can I now change those details back to what they were?

    I recently had my computer repaired by "pcfixit4u" who entered their phone number and email address on my hotmail account page. How can I now change those details back to what they were?

    original title:. Now, how can I change my password?

    Hello

    Given that the problem is related to hotmail, I suggest you to post the question in the forums and check them off below if it helps:

    http://windowslivehelp.com/solutions.aspx?ProductID=1

  • Get the phone number of the address book on the menu, click

    My app (which has no UI) adds a new menu item to the contacts Blackberry address book... Now, if you click on this menu I would get the phone number to contact selected...

    I did it with the addition of the menu item... But how can I get the phone number of the address book when you click on the menu?

    using code i below contacts called from another application have also recovered the phone number...

    BlackBerryContactList contacts = (BlackBerryContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
    

    But how can I get in my current scenario?

    Oops... How did I miss the best way to get the coordinates of the context of the run method (of the added menu) parameter.

  • Programmatically disable hyperlinks phone number

    Is it possible to encode a function that disables hyperlinks phone number? I don't know that the tag meta for websites, but if I surf other sites who don't

    I always have it disabled.

    The web page itself has included this meta tag.  There is no other way to turn it off.

  • Phone number not an option for iMessage on iPad mini

    Hello

    So my ID Apple was recently hacked and had to change my password on all my devices (iPhone 6 and mini iPad). But now that I changed, my iMessage works well for my iPhone, but on my iPad, I have no option to choose my phone number. I tried to reset iMessage, reset my iPad, everything. Now I'm curious to know why, that's happened what else I can do for an option again.

    Thanks in advance for helping me!

    To go through all these steps?

    Use continuity to connect to your Mac, iPhone, iPad, iPod touch and Apple Watch - Apple Support

    Use this feature with any Mac, iPhone, iPad, or iPod touch that satisfies the requirements of continuity system. Make sure that your devices are configured as follows:

    • Each device is connected to iCloud with the same Apple ID.
    • On iPhone, go to settings > Messages > Send and receive. Make sure the Apple ID at the top of the screen is the same Apple ID you use for iMessage on other devices. Add a check to your address, phone number, so that you can be reached by both iMessage. Do the same on your iPad or iPod touch.
    • On iPhone, go to settings > Messages > transfer, text messages, then choose which devices to send and receive text messages from the iPhone. A verification code and then on each device. Enter this code on your iPhone.
    • On Mac, open Messages, and then choose message > Preferences. Click accounts, and then select your account from iMessage. Make sure the Apple ID shown here is the same Apple ID you use on other devices. Add a control to your phone number and email address.

    Use the SMS and MMS messaging

    To use this feature, simply start conversations as usual in the Messages application on any of your devices. Alternatively, you can start a conversation by clicking a phone number in Safari, Contacts, calendar, or other applications detecting phone numbers. All your incoming and outgoing messages on all your devices.

  • Apple compromised account? My phone number has been updated and the address has been changed

    Earlier today, I was working on my mac and a notification popped up saying "AppleCare would like to view your screen". Since I didn't ask help or whatever it is I clicked on the decline. The message kept appearing for 5 times or more, whenever I clicked on the decline.

    A few minutes later I received an email saying that my phone number had been kidnapped to VoicePass. So I logged in my support profile and my phone number had indeed disappeared, replaced by another phone number. My address was also changed. I tried to delete the phone number and add new my phone number, but he wouldn't let me.

    My account has been compromised? I tried to contact apple, but I can't do, and the first call that I could program online is on Sunday.

    Thank you.

    Why were you not able to change the phone numbers on VoicePass? Did you change your password immediately Apple ID? I would recommend that do you if you have not yet.

    See you soon,.

    GB

  • Extraction of fixed phone number valid in the chain

    Hello

    We have field Phone_Number where data from the source system are as below:

    OFFICE: 026346644 # MOBILE: 0506212159

    MOBILE: 055-4705510 # OFFICE: 06-5035522/530

    Problem - we need to extract the valid landline phone number United Arab Emirates UNITED string ignoring the remaining details. Guys like 'OFFICE', ' MOBILE in the data are not significant and should not be considered. Even if the chain has several fixed phone number valid UNITED Arab Emirates, from 1 single value among them.

    Approach: We use regular expression check with 'Match list contains' but check only works on any value and not on the substring or part of the chain. Please suggest.

    Thank you

    Amol

    Hello Amol,

    Control RegEx is an 'Audit' processor then it will only tell you if a value passes or fails a control. If you want to return a value [i.e. phone number retrieves] then you will need to use the replacement of match or regex regex. Yes, regex to works on the entire chain, so you will need to write your regular expression as a result to find the phone number in among other content by using a capture group [Regex Tutorial - parentheses for grouping and capture]

    Thank you

    Nick

  • Apple id two verification step. What happens to the disabled reliable when phone number?

    Recently, I have restored my iPod touch 5 and during the implementation was faced with this application id of two steps. There seems to be no way of not choosing this option, so I used my phone number. I didn't do that but could find no other way to get around it. I assumed it was another bright Apple who must love or fixed ideas to stay up-to-date (as for example losing favorite functions e.g. shake to shuffle etc) of their clients. After doing this (subject), I received an email telling me that I might opt, which I did, but only after changing my password as I didn't want to do. The way I see it was not only a waste of time, but as someone who is intensely private and do not link personal information for security reasons I feel like I've been forced to do something I would never normally do just to keep the unit I paid a small fortune for compatible with applications that I want to use for example. latest versions of traktor etc. It makes me feel like anytime I can do to compromise my desires as a customer just to continue to use MY PROPERTY. Anyway there is the substance of my question (if you have not asleep and could be bothered to read it all) which in the end is - what happened to my number of confidence when I chose? I can't find anything about this in the text of presentation, or on the forum. It is to dispose of safely, or is it for always TAPI in some dark Apple cavity or FBI database (or other personal data collection entity)? At a time where we are told to pay attention to our information it seems to have been a lot of too-ing and back and forth of my personal data on the web for no reason and I'm done with a password change, that I didn't. Can anyone put my mind at ease on at least that?

    step 2 is optional, you didn't have to use it.

    If your idea that Apple don't has not given you the choice is bad, that you choose. But you can disable it again.

  • Cannot get activation for Server 2008 (network attached) phone number, because the error 0x8010002E stops the process.

    I'm trying to get the phone number and the information that I need to activate an installation of Server 2008. The server is my DC and sits on a closed network cannot reach the Internet. The installation was interrupted for more than 60 days, so to request activation. I'm not allowed to modify the current installation (i.e. relocation Server 2008). I have my current PID.

    When I go through the activation process, it fails with the error 0x8010002E. It gives me all the options for offline activation. The error code is for 'Lack of Smart Card Reader'. It's my DC so he shouldn't use a smart card to log on or to make administrative functions due to possible failure with the card reader software.

    How can I do it manually with these questions offline activation?

    I'm trying to get the phone number and the information that I need to activate an installation of Server 2008. The server is my DC and sits on a closed network cannot reach the Internet. The installation was interrupted for more than 60 days, so to request activation. I'm not allowed to modify the current installation (i.e. relocation Server 2008). I have my current PID.

    When I go through the activation process, it fails with the error 0x8010002E. It gives me all the options for offline activation. The error code is for 'Lack of Smart Card Reader'. It's my DC so he shouldn't use a smart card to log on or to make administrative functions due to possible failure with the card reader software.

    How can I do it manually with these questions offline activation?

    Hey bito808

    Here is the vista forums

    Try Server forums

    http://www.Microsoft.com/windowsserver2008/en/us/forums-blogs.aspx

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

    Walter, the time zone traveller

  • retrieve the phone number

    TelephonyManager mTelephonyMgr = (Context.TELEPHONY_SERVICE) context.getSystemService (TelephonyManager);

    Dim num = mTelephonyMgr.getLine1Number ();

    the num is proving to be null, I even used the debugger to probe each value in mTelephonyMgr, but none of them seems to contain the phone number, someone knows if it is possible to retrieve the phone number?  Thank you

    all comments are appreicated.

    Hi yuusaku,.

    Thanks for dropping by the forums!

    The telephone number through the TelephonyManager class would not be supported in the BlackBerry Runtime for Android applications by the documentation provided to during extraction: https://developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_hardware_features.ht...

  • Phone number for the change of blackBerry Smartphones

    I have a Blackberry Curve 9360 and receive the unwelcome calls. How to get the number changed?

    Thank you very much.

    1. your mobile operator changes your number, it is not a function within the BlackBerry itself, other than to insert a new SIM card with new number. You begin this process with your mobile operator.

    2. you have your phone number listed on your 'My Mobile provider' or the carrier. Put your phone number on the internet on these public forums for the world to see, is not wise. To change this, at the top of this page, click my settings > personal profile > personal information and in the entrance of the block of type 'Carrier' the name of your mobile operator.

    Display your number like that on a public forum could be a source of nuisance calls.

    Good luck.

  • BlackBerry smartphones can not dial the phone number of the browser

    I "upgraded" to the OS 6.0.  Now my BB does not allow me to click on a phone number I see on the internet and dial.  I have to read the number, memorize, close the browser and manually push in numbers.  UGG...   It's rotten.  Any suggestions?  T-Mobile continues to tell me it is the Web page I'm on, but he is clearly not that.  OS 6.0 is quite the downgrade.  If someone can hear the ugly notifers they call ringtones?  The assistance service directs you to buy ringtones of appworld.  What a pot!  Sell a phone that you can't hear the ringtone.

    I solved the problem by getting BlackBerry.  Now, I'm fully functional on a new Android phone.  Good luck.

  • BlackBerry Smartphones how hide or show my phone number of my BB Bold 9000 to others?

    Hi guys,.

    I tried to research this topic in the help BB website and I got this:

    Go to Options-> General Options-> the following powers:

    (1) to request that your phone number is hidden, change the restrict my identity field to always.

    (2) to request that your phone number is displayed, change the restrict my identity field to never.

    (3) to request that the network operator decide to hide or display your number, change the restrict my identity field to determined network.

    However, I can't find the "General Options" function in my BB Bold 9000. Can someone enlighten me on this please?

    Really appreciate!

    Best regards

    Ken

    Hi guys,.

    I called my local is a Service of Telco and was able to solve this problem.

    I had to press the call (green) first to join the list of calls before pressing the menu button. This is the selection of the General Option.

    It is also for those who have the same problem.

    See you soon!

    Ken

  • format phone number

    I need to format the phone number in a column of table as phone_number to

    (+ 1-888-888-8888) to (888)888-8888


    y at - it a function or query in oracle for this.  Help is appreciated

    SQL> with t
      2  as
      3  (
      4  select '(+1-888-888-8888)' phone_no from dual union all
      5  select '888888-8888' phone_no from dual union all
      6  select '+1-888-888-8888' phone_no from dual union all
      7  select '1232341233' phone_no from dual
      8  )
      9  select phone_no
     10       , '(' || substr(phone_no_digit, 1, 3) || ')' || substr(phone_no_digit, 4, 3) || '-' || substr(phone_no_digit, 7) phone_no_new
     11    from (
     12          select phone_no
     13               , substr(regexp_replace(phone_no, '[^[:digit:]]'), -10) phone_no_digit
     14            from t
     15         );
    
    PHONE_NO             PHONE_NO_NEW
    -------------------- --------------------
    (+1-888-888-8888)    (888)888-8888
    888888-8888          (888)888-8888
    +1-888-888-8888      (888)888-8888
    1232341233           (123)234-1233
    
    SQL>
    

Maybe you are looking for