How to remove tabs, several spaces, quotes from data in the column.

Hello

How can we remove legs, several spaces, quotes from data in the column.

Entry:

H ope you 'are' Ingo w ell

Output:

H ope do you everything - there is a tab in hope and double-spaced in the well. This should be replaced by space. (Tab and multi spaces)

I found myself with below:

REGEXP_REPLACE (REGEXP_REPLACE (Replace (col, Chr (9),' '), ' () {2,} ', ' '),'[' ""]', ")

Can we do more efficiently, your contributions are appreciated.

I tried

REGEXP_REPLACE (col,'[^ [a - z, A - Z, 0-9, Chr (0) - Chr (127) [: Space:]]] *', ") but the tabs still exist and that my data have German characters I can't go along with this.

Thank you

GVK.

Hello

Karthik417 wrote:

Hello

Thanks for your suggestion. In the above expression, we still missed to replace the double quotes.

So thought we must use another regular expression instead of REPLACE.

Select REGEXP_REPLACE (REGEXP_REPLACE (' H ope you "are" d "Ingo ell w ',' [' |])) CHR (9) | + ',' '),'["" "]') twice;

I suppose we must use at least 2 REGEXP to achieve and cannot get it with a single expression.

Thank you

Sorry, I removed single quotes, not double - quote.  (This shows one of the reasons why having a few lines of sample data is very useful).

I think you don't need 2 separate functions.  I do not think that the two must be REGEXP_REPLACE; You can use TRANSLATE to remove both types of quotation marks in a single function call:

TRANSLATE (REGEXP_REPLACE (col

, '[ ' || CHR (9) | ']+'

, ' '

)

, '?'''"',

, '?'

)

Of course, you can use use REGEXP_REPLACE to remove the quotes, if you really want to.

Powerful they are, regular expressions are basically only 1 thing, things not 2 or more different.  Sometimes, he can watch as they do several things, because they can operate on character classes, like the series containing the and the and a variable number of characters.  For example, the REGEXP_REPLACE function, I used above is simply changing expression expression x y, where x is 1 consecutive or more characters of a given set.  As we both demonstrated, we can have a separate function that changes from p to q, but I know not all built-in function which, in general, can change x to y at the time that it changes from p to q.  TRANSLATE comes close, but TRANSLATE only works if x, y, p and q are single (or NULL), characters not expressions.

Tags: Database

Similar Questions

  • How to remove special characters that are not available in the key board

    Hi all
    How to remove special characters that are not available in the key board.
    select '106    ©      500049' str from dual;
    
    After removal of the special symbols ( not only copy right, it can be any special symbol other than key board symbols), I want to add a single space between two number.
    
    Output should be like:
    Str
    106 500049
    Thank you for your help in advance.
    select
     '106    © ® (k)      500049' str
    ,regexp_replace('106    © ® (k)     500049', '[^[:digit:]]+', ' ') r
    from dual
    
  • How to remove messages in Exchange 2010 by dates. in a group and exclude the Contacts, record retention and calendar

    How to remove messages in Exchange 2010 by dates.  in a group and exclude the Contacts, record retention and calendar.

    I'm deleting emails from users in a group called MX_Purge file. I need to delete the emails date xx/xx/xxxx to xx/xx/xxxx.

    I also need to exclude the excluded the following records 'calendars' folders 'Contacts' and 'Retention '.

    The server people hang around more in the TechNet forums, if you ask, you will get a much better response:

    http://social.technet.Microsoft.com/forums/en-us/Exchange2010/threads

  • HOW TO REMOVE 2 PRINTERS INSTALLED UNDER WIN 7 ON THE SAME PORT (LPT1)

    HOW TO REMOVE 2 PRINTERS INSTALLED UNDER WIN 7 ON THE SAME PORT (LPT1)

    Microsoft answers site provides support in English. The following Uniform Resource Locator (URL) will be low - you receive information appropriate for your set up support. Open the link and get your region from the drop-down list, and then click the arrow to continue.

    http://answers.Microsoft.com/fr-FR

  • I've added two elements (accessibility and analyze) in the Tools menu of right hand.  How to remove or hide?  Or at least rearrange the elements of the toolbar. I want to Sign & certify be the last element/section.  Thank you.

    I've added two elements (accessibility and analyze) in the Tools menu of right hand.  How to remove or hide?  Or at least rearrange the elements of the toolbar. I want to Sign & certify be the last element/section.  Thank you.

    Hi Stacey Nathan,

    To remove the items from right toolbar, click Tools at the top.

    Then open the fall down to the accessibility or analyze and select 'delete the shortcut '.

    In a similar way, select "Add a shortcut" in the Tools drop-down menu to add to the tool on the right pane.

    Let us know if you need help.

    Kind regards

    Meenakshi

  • How to clean my disk space on LR mobile? The app on my iPad said: I have 26 GB stored two photos only 149

    How to clean my disk space on LR mobile? The app on my iPad I have 26 GB 27 GB stored. But I only 149 photos in two folders.

    Hi J.Forsberg,

    The images that you have on LR Mobile, they synchronize from LR Office or are they film.

    If they come from LR Desktop then images don't take up much space because they only thumbnails that are created.

    Also please check on your iPad app consumes the most space: https://support.apple.com/en-in/HT201656

    Please let us know if it helps.

    Kind regards

    Tanuj Sandal

  • How can I make a cell formula will apply for the entire column? For example D2 appears B2 - C2. How can I copy this formula for each cell in the column?

    How can I make a cell formula will apply for the entire column? For example D2 appears B2 - C2. How can I copy this formula for each cell in the column?

    If you want the formula is the same (B2 - C2) in the cell of each column you must change it as ($B$ - 2$ C$ 2). Then copy it, select the whole column and paste.

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

  • How to divide the data in the column based identifier

    Hello

    I use the oracle database.
    I have data in this format in my column 1234 ~ 2345 ~ 3456 ~ 4567.

    I need a motion to split the data in the column based on the identifier ' ~', so that I can choose the value after the second occurrence of the identifier.


    Do I know who can do this.

    Published by: 962987 on October 3, 2012 12:11

    Hello

    Welcome to the forum!

    Whenever you have any questions, please post CREATE TABLE and INSERT statements for some examples of data and the results desired from these data. For example, in view of these data

    CREATE TABLE     table_x
    (       my_column     VARCHAR2 (40)
    );
    
    INSERT INTO table_x (my_column) VALUES ('1234~2345~3456~4567');
    INSERT INTO table_x (my_column) VALUES ('just~2 parts');
    

    I think you're asking for these results

    PART_3     MY_COLUMN
    ---------- ----------------------------------------
    3456       1234~2345~3456~4567
               just~2 parts
    

    I suppose that, if the string does not contain at least 2 ' ~ s, you want to return null. It's a good idea to explain what you want like that for special cases and include examples in your sample data and results.

    Not all versions of Oracle are exactly the same. In fact, they are all different. If you want the best solution that works with your version, then say what version it is.
    The following query will work in Oracle 10.1 and higher:

    SELECT  REGEXP_SUBSTR ( my_column
                    , '[^~]+'
                    , 1
                    , 3     -- 3rd occurrence (after 2nd delimiter)
                    )     AS part_3
    ,     my_column          -- if wanted
    FROM    table_x
    ;
    

    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, October 3, 2012 15:24
    Adding sample data and results.

  • How to remove all Xbox Music metadata from the clouds?

    I experienced some problems with Xbox Music in all of my devices (Surface RT and Lumia 920), to do with duplication of the song, read errors, playlists appears not and so on.

    'Luckily', my Surface RT walled up the other day, and my brand new replacement is underway, so I take the opportunity to reset my phone also, synchronize my collection of music from scratch (also goes to change my region Xbox to my current locale while I am).

    Thus, with respect to any information library that currently exists in the cloud, how to remove, so I can start over?

    Also, what sync options could recommend you on both devices, so I can have a smoother experience this time?

    Thank you.

    Hello

    See if these solutions work for you.

    http://forums.Xbox.com/xbox_forums/xbox_support/f/3144/t/406540.aspx

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-pictures/how-to-delete-music-in-Xbox-cloud-collection/53ad81c9-2832-4d3f-85AF-a38e3b2d73a9?msgId=c21527e2-9349-417e-889f-da3da8ad202c

    See the solution of Plantje dated date December 24, 2012

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-pictures/how-to-delete-music-in-Xbox-cloud-collection/53ad81c9-2832-4d3f-85AF-a38e3b2d73a9?msgId=c21527e2-9349-417e-889f-da3da8ad202c

  • How to share tabs between my various Firefox installations using the new system of accounts of Firefox?

    I use Firefox Nightly (2014-02-18, 30.a1, x 64) on my laptop (Windows Pro 8.1 x 64) and I was using Firefox Beta on my Nexus 5 (Android 4.4.2). Recently, Mozilla announced the new system of accounts of Firefox (which replaces the old Firefox Sync account) and I created an account of Firefox for my computer laptop installation every night. Because the new account in Firefox does not work with the old Firefox Sync account, I replaced my installation Android of the beta version of Firefox with Firefox Nightly and signed account Firefox on my Android. However, when I try to send a tab of my Android installation to my installation of laptop using intend to 'Share for every night', every night asking me to implement a sync account, which is impossible to fill in my computer laptop system every night. I tried to replace my Android installation every night with an Android Aurora facility, but the same problem occurs.

    What's worse, is that even with my laptop and Android facilities signed on the same account in Firefox, I'm not all information is synchronized between 2 facilities. No story is shared, and I don't see the list of tabs opened from the other device. I can't move tabs between my phone and my laptop, which is something I've used every week I visited websites and read that my RSS FEED on my phone. Does anyone know how to share tabs using Firefox's new accounts? Does anyone know why Firefox accounts doesn't seem to be synchronization of data between my 2 installations?

    Hi gfactor:

    An update on this issue. I think that this (965811) was fixed in Firefox Beta 29.

    Please try beta if you have some time (just search for Firefox Beta on the google play and then install firefox beta) and let us know if Firefox 29 beta sendtab now works for you.
    
  • How to remove McAfee security scran more my boot of the System Configuration.

    Hi, my laptop is a Windows vista 32-bit, I have a problem to remove McAfee Security scran more my boot of the System Configuration. In fact, I had used the removal tool to remove the antivirus McAfee sofeware eralier. But when I opened my startup Configuration recently, I noticed that the McAfee security plu scran is still there, I have turn off, but couldn't delete it. Help, please. Thank you.

    Gary

    Hello

    1. are you able to uninstall successful McAfee software?
    2. is there an error message or error code while you uninstall McAfee software?

    Try the following and see if it helps.

    Method 1:

    How to uninstall McAfee Security Scan Plus? : http://service.mcafee.com/FAQDocument.aspx?lc=1033&id=TS100783

    See also: http://promos.mcafee.com/LegacyLp/en-us/affiliates/adobe/landingpages/np681.asp

    Method 2:

    Uninstall if you have any program name McAfee Security Scan Plus on your computer.
    Uninstall or change a program: http://windows.microsoft.com/en-US/windows7/Uninstall-or-change-a-program

    See also:

    Solve problems with programs that cannot be installed or uninstalled:http://support.microsoft.com/mats/Program_Install_and_Uninstall

    Note: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://windows.microsoft.com/en-US/windows-vista/Back-up-the-registry

    Method 3:

    The System Configuration utility displays the items that start with your computer. These items are usually in one of two areas. The registry or during startup.

    If you decide to prevent specific items from start until you can uncheck the in the System Configuration utility. Although this method is very good, it is ultimately preferable to delete them from the source. To access the common locations in the registry of these elements take a look in the following areas:

    Note : open the registry editor by clicking the Start button, type regedit into the search box, and then press ENTER. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

    Hkey_current_user\\software\\microsoft\\windows\\currentversion\\run

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce

    If you have disabled items in the System Configuration utility and want to remove the registry also they lies in one of the following locations:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SharedTools\MSConfig\startupfolder

    HKEY_LOCAL_MACHINE startupreg

    Note: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://windows.microsoft.com/en-US/windows-vista/Back-up-the-registry

  • How to remove one person's finger print data so I can register the new employee?

    Original title: removal of fingerprints.

    I have a Windows 8 platform and has recently terminated an employee who had their account on a desktop computer and laptop configuration.  After deleting the account on the desktop, it took me a while to understand why I still couldn't connect to the system.  An hour later, the problem has been fixed.

    To avoid repeating the process on the laptop, I decided to keep the account and just rename the account to the new support employee.  I changed the passwords, but can not configure the fingerprint reader.  He says that I have to get the former enrollee to slide their fingers.  This employee has been dismissed and their likelihood to help me is thin votes to zero.

    So my question is: how to remove the data of a person so I can register the new employee?  I found a method, but it requires me to remove all data from fingerprints of all users.  This isn't something I want to do.  Help, please.

    Hello

    The fingerprint reader is not really part of Windows.

    You will need to work with support from the system manufacturer that is responsible for both
    hardware and driver/security for the fingerprint reader software. If they have forums
    check in these institutions.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • How to remove a file in Adobe Acrobat format for the air to the iPad.

    I opened a number of files in Adobe Acrobat format for iPad. I would like to know how to remove the file when I don't need the iPad. Thank you

    Hello

    Please take a look at the following FAQ document.

    How to manage files in Adobe Acrobat, DC format for iOS

    You can change the location of the local file and delete files from your iPad.

    I hope this helps.

  • IDCS6 MACOSX JS: script of 'remove unused layer' is not from masters of the masters

    Hello everyone.

    I have an old script I've used several times to remove the unused layers. Until today, I thought that worked well:

    var layers = app.documents[0].layers.everyItem().getElements();
    for(var i=layers.length-1;i>=0;i--){
      if(layers[i].pageItems.length==0){
        layers[i].remove();
      }
    }
    

    However, today, I used the script on a document that was a never used layer once on a master page to which other master pages have taken place on the basis. To my surprise, when the script is run, this specific layer has been removed.

    my knowledge of the script is poor, but looking at the script, it seems that the script is looking at all the layers that have something in them and any layer comprising any element should be removed. However, I think that only made pageItems refers to the regular pages or template, not masters BASED ON other masters.

    I think that the problem is similar to another that I had recently where I had a script that has removed the unused masters, but deleted that other masters masters took place on the basis, and I think that the principles are the same. This thread can be found at:

    http://forums.Adobe.com/message/5922004#5922004

    In short, the script that worked there were as follows:

    xUnusedMasters(myDoc);
    
    function xUnusedMasters( docRef ) {
    var mpNames = new Object () ;
    var allPages = docRef.pages ;
    for ( var pIndex = allPages.length - 1 ; pIndex >= 0 ; pIndex-- ) {
    mpNames = addMasterName ( mpNames , allPages[pIndex] ) ;
    }
    
    var allMasterPages = docRef.masterSpreads ;
    for ( var mpIndex = allMasterPages.length - 1 ; mpIndex >= 0 ; mpIndex-- ) {
    if ( ! mpNames[allMasterPages[mpIndex].name] ) {
    allMasterPages[mpIndex].remove() ;
    }
    }
    return ; 
    
    function addMasterName ( MPDB , pageRef ) {
    if ( pageRef == null ) { return MPDB ; }
    if ( pageRef.constructor.name == 'MasterSpread' ) {
    MPDB[pageRef.name] = true ;
    }
    return addMasterName ( MPDB , pageRef.appliedMaster ) ;
    }
    }
    

    is it possible to modify the script above so that instead of remove unused pages of masters, it takes away the layers used in a similar way?

    Thank you very much

    Colly

    Hello

    Maybe a little differently...:

    Array.prototype.filter = function(collection) {
              var k, i, con, ids = collection.everyItem().id;
              con: for (k = ids.length - 1; k >=0; k--)
                        for (i = 0; i < this.length; i++)
                        if (this[i].id == ids[k]) {
                             ids.splice(k, 1);
                             continue con;
                             }
              return ids;     // array with unmatched ids from collection
              }
    
    var
              mL = app.activeDocument.pageItems.everyItem().itemLayer,
              mUnusedLayersID = mL.filter(app.activeDocument.layers),
              len = mUnusedLayersID.length;
    
    while (len-->0)
              app.activeDocument.layers.itemByID(mUnusedLayersID[len]).remove();
    

    mL is a table with a layer of each pageItem;

    filter compared to the collections of doc.layers;

    unmatched ways not so used are deleted.

    Jarek

Maybe you are looking for