Regular Expressions and phone number

HI,
there is a column "Phone_number Varchar2"
Data containing :
123-89556-6852
(123)-857-965
123-(5846)5648
I want to display that
123895566852
123857965
12358465648
Pls help by Regular Expressions.
Edited by: YLN on Feb 17, 2010 3:59 PM

with t
as
  select '123-89556-6852' col from dual union all
  select '(123)-857-965' col from dual union all
  select '123-(5846)5648' col from dual
SELECT regexp_replace(col,'[^[:digit:]]') FROM tRavi Kumar

Similar Messages

  • TA38622 how do you delete a contact name and phone number from this?  i have deleted it from my regular contacts, but it remains in a text memory when i begin to type the beginning of a name

    How do I delete a contact name and phone number from my texting memory?  I have deleted this contact from my regular contact information; however when I text and begin to text a contact beginning with the 1st letter of the name I had deleted, it brings up the old, deleted contact information in my texting history only.

    You would have to restore as new.

  • Regular expression and output format

    hi all,
    i have following scenario-
    regular expression: [0-9]{3}-[0-9]{3}-[0-9]{4}
    generated value by the above regular expression: 123-234-6789
    output format to display the generated above value: xxx-xxx-$1
    now i need to display the generated value (123-234-6789) in the specified output format (xxx-xxx-$1) and the final output will be xxx-xxx-6789
    how is it possible?
    Note: here regular expression and output format can vary
    br,
    bashar

    Hi, Bashar
    You can solve this problem by using the Data Masking Technique.
    Masking data means replacing certain fields with a Mask character (such as an X). This effectively disguises the data content while preserving the same formatting on front end screens and reports. For example, a column of credit card numbers might look like:
    4346 6454 0020 5379
    4493 9238 7315 5787
    4297 8296 7496 8724
    and after the masking operation the information would appear as:
    4346 XXXX XXXX 5379
    4493 XXXX XXXX 5787
    4297 XXXX XXXX 8724
    The masking characters effectively remove much of the sensitive content from the record while still preserving the look and feel. Take care to ensure that enough of the data is masked to preserve security.
    It would not be hard to regenerate the original credit card number from a masking operation such as: 4297 8296 7496 87XX since the numbers are generated with a specific and well known checksum algorithm.
    Best Regards,
    Mahfuz Khan

  • "Match Regular Expression" and "Match Pattern" vi's behave differently

    Hi,
    I have a simple string matching need and by experimenting found that the "Match Regular Expression" and "Match Pattern" vi's behave somewhat differently. I'd assume that the regular expression inputs on both would behave the same. A difference I've discovered is that the "|" character (the "vertical bar" character, commonly used as an "or" operator) is recognized as such in the Match Regular Expression vi, but not in the Match Pattern vi (where it is taken literally). Furthermore, I cannot find any documentation in Help (on-line or in LabVIEW) about the "|" character usage in regular expressions. Is this documented anywhere?
    For example, suppose I want to match any of the following 4 words: "The" or "quick" or "brown" or "fox". The regular expression "The|quick|brown|fox" (without the quotes) works for the Match Regular Expression vi but not the Match Pattern vi. Below is a picture of the block diagram and the front panel results:
    The Help says that the Match Regular Expression vi performs somewhat slower than the Match Pattern vi, so I started with the latter. But since it doesn't work for me, I'll use the former. But does anyone have any idea of the speed difference? I'd assume it is negligible in such a simple example.
    Thanks!
    Solved!
    Go to Solution.

    Yep-
    You hit a point that's frustrated me a time or two as well (and incidentally, caused some hair-pulling that I can ill afford)
    The hint is in the help file:
    for Match regular expression "The Match Regular Expression function gives you more options for matching
    strings but performs more slowly than the Match Pattern function....Use regular
    expressions in this function to refine searches....
    Characters to Find
    Regular Expression
    VOLTS
    VOLTS
    A plus sign or a minus sign
    [+-]
    A sequence of one or more digits
    [0-9]+
    Zero or more spaces
    \s* or * (that is, a space followed by an asterisk)
    One or more spaces, tabs, new lines, or carriage returns
    [\t \r \n \s]+
    One or more characters other than digits
    [^0-9]+
    The word Level only if it
    appears at the beginning of the string
    ^Level
    The word Volts only if it
    appears at the end of the string
    Volts$
    The longest string within parentheses
    The first string within parentheses but not containing any
    parentheses within it
    \([^()]*\)
    A left bracket
    A right bracket
    cat, cag, cot, cog, dat, dag, dot, and dag
    [cd][ao][tg]
    cat or dog
    cat|dog
    dog, cat
    dog, cat cat dog,cat
    cat cat dog, and so on
    ((cat )*dog)
    One or more of the letter a
    followed by a space and the same number of the letter a, that is, a a, aa aa, aaa aaa, and so
    on
    (a+) \1
    For Match Pattern "This function is similar to the Search and Replace
    Pattern VI. The Match Pattern function gives you fewer options for matching
    strings but performs more quickly than the Match Regular Expression
    function. For example, the Match Pattern function does not support the
    parenthesis or vertical bar (|) characters.
    Characters to Find
    Regular Expression
    VOLTS
    VOLTS
    All uppercase and lowercase versions of volts, that is, VOLTS, Volts, volts, and so on
    [Vv][Oo][Ll][Tt][Ss]
    A space, a plus sign, or a minus sign
    [+-]
    A sequence of one or more digits
    [0-9]+
    Zero or more spaces
    \s* or * (that is, a space followed by an asterisk)
    One or more spaces, tabs, new lines, or carriage returns
    [\t \r \n \s]+
    One or more characters other than digits
    [~0-9]+
    The word Level only if it begins
    at the offset position in the string
    ^Level
    The word Volts only if it
    appears at the end of the string
    Volts$
    The longest string within parentheses
    The longest string within parentheses but not containing any
    parentheses within it
    ([~()]*)
    A left bracket
    A right bracket
    cat, dog, cot, dot, cog, and so on.
    [cd][ao][tg]
    Frustrating- but still managable.
    Jeff

  • I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    We went through my friend's phone and my daughter's email and phone number are not in it.  I have never given my daughter's iphone number to my friend.  Is it something to do with gmail or my apple id?  My daughter (14) has been using my computer as her "base" for HER Iphone. 
    My friend does use her iphone number as an email address as well.
    For instance:  her phone number might look like this:  (493) 305-3958
    and her email address would look like this:  [email protected]
    If I Iphone/email my friend, she receives it as a text message.  Then if she replies to that text message, it goes to my daughter's phone and not mine.  It's completely crazy!  We searched her phone contacts and did not find my daughter's phone number anywhere or attached anywhere to mine.  Since when does Iphone emailing wind up in the text messaging area?

  • Email and Phone number added to contact list without permission?

    Just discovered an email and phone number added to my contact list under my name and its not mine! How did this happen? Can't call Apple because my 90 days has expired and they won't answer the question without me paying!! So frustrating!! Hoping someone has an answer for me??

    What is the full message of the notification ? If your phone number and email address were added to, for example, the Messages app on another device then you will need to go to that other device to remove them from it

  • How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    Phone A = phone with information you want duplicated
    Phone B = phone that you want to copy from A
    Backup Phone A.
    Wipe Phone B using these instructions. What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support
    Phone B should be on the 'Hello' screen. Do not swipe it. Launch iTunes. Plug in Phone B.
    When iTunes asks if you want to set up as new phone or restore from backup, choose restore from backup of Phone A.
    After this setup, any changes to one phone (i.e. adding a contact, downloading an app) will have to be manually duplicated on the second phone, if that is your desire). Making changes to one phone will not affect the other after setup.

  • I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts)

    I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts).  I dont know how to repair this.  what a nightmare

    An icloud account is designed to be used by just one user.  If you have given your ID or set up your account on someone else's device, then their data will be mingled with your or worse.

  • I have just bought a new iPhone and gave my old one to my Mum. My problem is that even with a new SIM and phone number I seem to be getting her messages as well as mine on my thread. They are also being recorded as both sent and received so she must be pa

    I have just bought a new iPhone and gave my old one to my Mum. My problem is that even with a new SIM and phone number I seem to be getting her messages as well as mine on my thread. They are also being recorded as both sent and received so she must be paying twice for each SMS sent. Help please

    Wipe iPhone/iPad/iPod touch clean
    There are a few steps to do:
    Switch off iMessage in Settings > Messages
    Switch off FaceTime in Settings > FaceTime (iPod touch 4th Generation or later, iPhone 4 or later and iPad 2 or later)
    Delete iCloud in Settings > iCloud > Delete Account
    Finally Settings > General > Reset > Erase All Content and Settings.
    Un-register your device: https://supportprofile.apple.com
    Now you can sell/give.
    Now, you should get her a new Apple ID to sign in the options above.

  • When i send a text in iMessage the person receiving it gets it from my email address... how do i change that. and in message settings the receiving thing has my email and phone number but my phone number is gray and i can't click on it

    when i send a text in iMessage the person receiving it gets it from my email address... how do i change that. and in message settings the receiving thing has my email and phone number but my phone number is gray and i can't click on it help

    Hello Todd:
    I had this very same problem when trying to activate iMessage and Facetime on my iPad. When I signed into my account, I actually wasn't even presented with the option of a phone number - notwithstanding the fact that I was contacting others (and being reached by others) by my phone number on my iPhone. Having both the iPad and the iPhone on, I kept trying to turn off and on both iMessage and Facebook in Settings on both my iPad and iPhone, hoping that that they would eventually sync. But this proposed solution by others was unsuccessful for me.
    Then, I found out what the problem was: When my iPhone was activated, it automatically registered my phone number for contact purposes. I was using iMessage on my iPhone for quite some time without actually being signed into my Apple ID account. When another device - such as an iPad or iPod - is being used for iMessage or Facebook, you are prompted to sign into your Apple account, using your username and password. These two devices will not register your phone number as an option for contact unless your iPhone is signed into your Apple account as well. In other words: your phone number will not be synced.
    Go into your "Settings" on your iPhone and click on "Messages". Scroll down and click on "Send & Receive" (which should be followed by your phone number). On the next page, you will be able to determine whether or not your iPhone is using the Apple ID for messaging purposes. (Note: This information applies for Facetime as well.) If it is using your Apple ID for messaging, than at the top, you will see "Apple ID: <your particular e-mail account>" in Blue text. However, if you are not using your Apple ID for messaging, than you will see the words: "Use your Apple ID for message". Even though below this you will see your phone number checked as the contact source, you will want to click the tab that says, "Use your Apple ID for message". Sign into your account (just as you must sign in for iMessage on your other devices), and just choose your phone number as the "Send & Receive" contact. (The option of the e-mail will be there too, but you don't have to check it. And later on, you can delete it as an option.)
    Now that all of your devices are signed in using your Apple ID, the other devices should register your phone number as a choice. It may take a little while, however. What I did was sign out of iMessage on my iPad, and then sign in again. If the option didn't appear, I just went back and signed in again, and kept doing this until the option for the phone number appeared.
    Again, this will work for Facetime as well. The solution is to sync your iPhone account with the other devices by using your Apple ID for messaging (and Facetime) purposes.
    I hope that this works for you, Todd!   ~ Brian

  • Regular expressions and sql

    I have working regular expressions and a working sql connection, but I don�t know how to stop the info from getting into the database when input doesent match the regular expression.
    For instans, you put in an e-mail without an "@" and my program writes and error message. But the info still gets in to the database.
    Any help would be much apreciated as I dont know where to start. If you have links or code examples that would be great to.
    Thanx.

    Well, the obvious answer is "only write the data to the database if the input doesn't match the regular expression."
    Presumably you're really asking how to do that - but it depends upon how your application is structured in the first place, and you haven't told us anything at all about that.

  • TS2326 apple id and phone number of the same contact on different threads

    Hi I have a single contact with apple id and phone number on my iphone 4 ios6. The issue is I have 2 contacts in Messages for the same Contact entry: one with the phone number (green bubbled) and the other with the apple id (blue bubbled). Too annoying. Couldn't find how. Any help? Thanks.

    now I'm having the same problem but with the Weather Center app. Whenever I turn on the iPhone I get a notification the weather center is using current location and do I want to continue letting it or not. But there is another error message behind with a keypad and this time I cannot dismiss the weather center dialog.
    Any suggestions?

  • Regular Expression and PL/SQL help

    I am using Oracle 9i, does 9i support regular expression? What functions are there?
    My problem is the birth_date column in my database comes from teleform ( a scan program that reads what people wrote on paper), so the format is all jacked up.... 50% of them are 01/01/1981, 10% are 5/14/1995, 10% are 12/5/1993, 10% are 1/1/1983, 10% are 24-JUL-98. I have never really used regular expression and pl/sql, can anybody help me convert all of them to 01/01/1998?
    Does Oralce 9i support regular expression? What can I do if oralce 9i does not support regular expression? Thank you very much in advance.

    9i doesn't support regular expressions (at least not in the 10g regular expressions sense. There is an OWA_PATTERN_MATCH package that has some facilities for regular expressions). But it doesn't look like this is a regular expressions problem.
    Instead, this is probably a case where you need to
    - enumerate the format masks you want to try
    - determine the order you want to try them
    - write a small function that tries each format mask in succession until one matches.
    Of course, there is no guarantee that you'll ever be able to convert the data to the date that the user intended because some values will be ambiguous. For example, 01/02/03 could mean Feb 1, 2003 or Jan 2, 2003 or Feb 3, 2001 depending on the person who entered the data.
    Assuming you can define the order, your function would just try each format mask in turn until one generated a valid date, i.e.
    BEGIN
      BEGIN
        l_date := TO_DATE( p_string_value, format_mask_1 );
        RETURN l_date;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END;
      BEGIN
        l_date := TO_DATE( p_string_value, format_mask_2 );
        RETURN l_date;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END;
      BEGIN
        l_date := TO_DATE( p_string_value, format_mask_3 );
        RETURN l_date;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END;
      BEGIN
        l_date := TO_DATE( p_string_value, format_mask_N );
        RETURN l_date;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END;
      RETURN NULL;
    END;Justin

  • Regular expressions and backreference

    Hello!
    I am trying to use backreferences in REGEXP in the PERL-style, where I want to match my regular expression and later refer to the grouped values. I can read that those are referecenced with \1 .. \9, but I simply cant get it to work. Here is an example in PL/SQL:
    SELECT REGEXP_SUBSTR(l_users.adresse,'([A-Z]+)\s+(\d+)')
    INTO l_dummy_varchar2
    FROM dual;
    OR I could do things like:
    l_dummy_varchar2 := REGEXP_SUBSTR(l_users.adresse,'([A-Z]+)\s+(\d+)');
    It seems to work, but I cant figure out how to get the backreferenced value.
    I would love to do things like:
    dbms_output.put_line('my value ='||\1)
    but this doesnt work.
    Help is very much appreciated.
    Best regards
    Dannie

    Likewise you can extract things using the
    REGEXP_SUBSTR, but you don't need back
    referencing...backreferencing is better than additional function (ltrim) use, and BTW be careful with this "ltrims":
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2       v_txt VARCHAR2(100);
      3     BEGIN
      4       v_txt := ltrim(regexp_substr('HERE IS AN ASCII CHARACTER', 'IS AN [[:alnum:]]*'),'IS AN ');
      5       DBMS_OUTPUT.PUT_LINE('Word after IS AN: '||v_txt);
      6  END;
      7  /
    Word after IS AN: CII
    PL/SQL procedure successfully completed
    SQL>
    SQL> DECLARE
      2       v_txt VARCHAR2(100);
      3     BEGIN
      4       v_txt := regexp_replace('HERE IS AN ASCII CHARACTER', 'IS AN ([[:alnum:]]*)|.','\1');
      5       DBMS_OUTPUT.PUT_LINE('Word after IS AN: '||v_txt);
      6  END;
      7  /
    Word after IS AN: ASCII
    PL/SQL procedure successfully completed
    SQL> -----------
    VB
    http://volder-notes.blogspot.com/

  • Juniper MX Regular expressions and user permissions ACS 5.4

    Hi everyone!
    Im having some trouble with regular expressions and permissions on our Juniper MX routers through ACS 5.4, and i would like some insight/help/poitners!!
    We have a team of engineers that should only have read only permissions (important: show configuration) and also be able to just change the description on interfaces.
    Thus far with the following regular expressions set for the shell profile they are going through i have managed the above, however the problem is when an engineer inputs "Show configuration", only the interfaces descriptions configuration is shown! The rest of the configuration will not be printed.
    deny-commands1=.*.
    allow-commands1=configure
    deny-configuration1=.*.
    allow-commands2=interfaces .*. description .*$
    allow-configuration1=interfaces .*. description .*$
    allow-commands2=show configuration.*
    allow-commands3=show configuration
    (some of these regex i know that are not needed, i was just playing around to check everything before posting)
    Any pointers as to why or how to resolve this?
    example output with the above:
    show configuration
    ## Last commit: 2014-01-09 09:34:44 EET by someone
    interfaces {
        xe-0/0/0 {
        xe-0/0/1 {
            description xxxx;
        xe-0/1/0 {
            description xxxx;
        xe-0/1/1 {
            description xxxx;
        xe-0/2/0 {
            disable;
        xe-0/2/1 {
            description xxxx;
        xe-0/3/0 {
            description xxxx;
        xe-0/3/1 {
            description xxxx;
        ae0 {
            description "xxxx";
        ae1 {
            description xxxx;
        demux0 {
        lo0 {
    {master}
    Thanks in advance!
    Spyros

    You are absolutely right!!  I was doing research online after posting the above.  The correct RADIUS attribute to use is actually CVPN3000/ASA/PIX7.x-Group-Based-Address-Pools.  Then create the pool in ASA, and call that pool's name in ACS under that RADIUS attribute.  Someone explained this perfectly in this community before.  Much appreciate your answer!
    Here's from another post last year:
    ACS  5 does not have the feature of IP pools. Logically its always good to  setup pools locally on vpn server and if you want user to pick ip from  specific local pool you can configure acs to push that attribute.
    On ACS Go to > Policy Elements  -> Network Access ->   Authorization Profiles -> Create ->
    Name of the Policy ->Dictionary Type: Radius-Cisco VPN 3000/ASA/PIX7.x
    Attribute Type : CVPN3000/ASA/PIX7.x-Group-Based-Address-Pools
    Attribute Type: String
    Attribute Value : Static MYPOOL (Name of the Pool which is defined on the ASA)
    Access Policies ->Default Network Access -> Authorization ->  Create -> Under result section call the Authorization p

Maybe you are looking for