remove a space and a special character


Hi all

I'm using Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

I have a text (ABC - GB * C V - G /.) (F) and I want to remove all special characters and space and display as (ABCGBCVGF). Appreciate all your thoughts.

Thank you

SQL> select regexp_replace('ABC-GB*C V-G/.F', '[^[:alpha:]]') val
  2    from dual;

VAL
---------
ABCGBCVGF

Tags: Database

Similar Questions

  • Remove the spaces and special characters to a form field

    Hello

    I am tragically new to all this, but I'm trying to create a form in Adobe Acrobat 9.  I am trying to use a custom script Format to make entries in a form field and automatically remove the spaces and special characters (hyphens specifically).  For example, if a user 'RAN - 99 06' entries I want to change it to "RAN9906."  I found this script that does not allow users to input special characters

    If (! event.willCommit) {}


    Event.change = event.change.replace (/ [------$# ~ %------*------*------^-------------(\)------+=------[\]------{\}; \ "\ <>\ \?"]) \ | \\\ !] /g, "");

    }

    And it's OK, but I can't understand how to prohibit the spaces.  In addition, the perference would be a script to allow users to enter data as they wish, but to clean after leaving the text field.

    Thanks in advance!

    Yes, there are a few changes during the passage of the code of the event in the sequence of keys to the Validate event.

    First of all, you need not try the willCommit. In fact, when the sequence of events of field reached the Validate event, the field is already committed. The Validate event does not therefore the property of willCommit.

    Secondly, in the Validate event, you work on the event.value and either event.change. Thus, you will replace accordingly.

    And who should actually do.

    I hope this can help.

    Max Wyss.

  • possible bug in match pattern string of dot and a special character

    Hi friend recently and I find something in game chain model that it looks like bug, I want to know labveiw expert opinion on it
    the possible bug is
    have you ever tried to match (.) dot for use in regular expression? this icon could not find the point inside the string? 
    I also think what happens if we try to find a character within a string that is a piece of special character
    for example how you can use this icon to find \b inside the string as (hatef\blabview)?

    [.] to find the period

    \\B to find the backslash b

  • Remove the spaces and characters not a calculated field standard

    Hello

    I am fairy new forms Adobe script, but I managed to do that day. I am currently working on a form that we send to the suppliers to implement in our systems.

    One of the fields is called "Name of organization", which has a custom format script that modifies the text entered in uppercase in the field output:

    Event.Value = event.value.toUpperCase ();

    I have a hidden field "Own name branch" which is a code of calculation organistion which allows us to identify the organization within our systems (which can use letters). I need 'Own organization name' to be a calculation of "Name of organization" with all the spaces and non-standard characters deleted (", ([]) @$' &... etc").

    Could someone help me with this?

    Thanks in advance

    Chris

    This should do the trick:

    Event.Value = this.getField ("Organization Name").valueAsString.replace(/[\W,_]/g,"" ");

  • Remove the spaces and special characters.

    Hi all

    Here is the table of phone having a column that is 'phno' and the values are the below in this format.

    I need given the output.

    My client uses oracle 8i version.

    EmplId

    PhNO

    output

    121212

    605/339-9276

    6053399276

    222222

    251/813-0663

    8132510663

    323232

    208-585-1594

    2085851594

    232323

    352.735.8285

    3527358285

    Thank you

    music

    Hello

    DEFINITION of use,

    If it is possible to enumerate all special characters, do this way:

    SELECT emplid, phno

    REPLACE (phno

    , '9 ./'

    , '9'

    ), Exit

    FROM table_x

    ;

    If it is impossible, or if it is easier to display the characters that you want to keep, then do it like this

    SELECT emplid, phno

    REPLACE (phno

    , '9  || TRANSLATE (phno

    , ' ?' 0123456789

    . '?'

    )

    , '9'

    ), Exit

    FROM table_x

    ;

    Whatever it is, the argument 3 of TRANSLATE is one of the characters that you want to keep (any), and the 2nd argument is that same character, followed by all the characters that you want to remove.

    Nevermind, you use such an old version.  Regular expressions are much easier.

    This will leave 1 "at the beginning of '13527358285'.  How to remove characters like this depends on means exactly what "characters like this.  It can probably be done in Oracle 8 without too many problems, according to your needs.

  • Remove white space and withdrawal code in Dreamweaver CS5

    Ive inherited code that has loads of randomly placed areas and jumps of line. Is it possible to clean up the code so its dash like that with Dreamweaver CS5? :

    < div >

    < div >

    < div >

    < / div >

    < / div >

    < / div >

    Yes, you can have Dreamweaver indent your code by going to the 'Format Source Code' button on the toolbar and selecting 'apply Source Formatting '.

    You can change the way your text is formatted in Preferences > Format of Code

  • Remove the spaces between the css attributes?

    Hello! I know that I can customize my preferences to 'apply the updated source shaped', but it is automatically added to spacing to the attributes of the tag and I don't see a way to change this in the options I give. I want to write my code without spacing in the attributes. Believe it or not, it is easier on my eyes in this way.

    That's what I prefer:

    whatever {width: 40%; height: 25% ;}}

    If I use source formatting, it does this:

    whatever {width: 40%; height: 25% ;}}

    If I can't change this behavior in the settings, not much, but I want to assure you that I have not just miss.

    Thank you!

    You don't miss anything.  DW uses conventional spaces between the CSS attributes.

    You can shrink your CSS code at the end of the project.  That will remove the spaces and line breaks.

    Nancy O.

  • FDK - remove empty paragraphs and nb spaces in a document

    Hello

    I'm trying to remove the empty paragraphs and spaces nonbreaking not a document - have tried to cross through the paragraphs in the document by getting the ID of the paragraph and find every paragraph start and end (with FTI_PgfEnd) to check all the channels in the meantime. However, I do not get the result.

    EmptyPara.JPG

    I get the following:

    EmptyPara_del.JPG

    Any help would be appreciated...

    Welcome,

    pnk80

    OK, I have not had the time for it but started to get curious anyway. I found a way to remove when the text also contains tabs or nonbreaking spaces. I added the following front of the line of F_StrStripLeadingSpaces():

    IntT j;

    for (j = 0; j< f_strlen(textitems.val[i].u.sdata);="">
    If (. u.sdata textItems.val [i] [j] == 8 | textItems.val [i] [j].u.sdata == 17)
    textItems.val [i] [j].u.sdata = 32;

    .. as in:

    . . .

    for (i = 0; i< textitems.len;="">
    {
    IntT j;

    for (j = 0; j< f_strlen(textitems.val[i].u.sdata);="">
    If (. u.sdata textItems.val [i] [j] == 8 | textItems.val [i] [j].u.sdata == 17)
    textItems.val [i] [j].u.sdata = 32;

    remove the spaces to the left. If the string is nothing but white space, we will
    get an empty string
    F_StrStripLeadingSpaces (textItems.Val [i].u.sdata);

    . . .

    This replaces tabs and spaces of nb with normal spaces, until the rest of the operation continues (8 = tab, 17 = nb space).  I must say, though, I'm a little confused about why these character codes are used. I would have thought the tab would be 9, and the nb of space something else. But in any case, it works in my test.

    Russ

  • Remove the empty spaces and LF between lines in xml

    Is there a way to remove the empty spaces and LF between XML nodes?

    Let's say I

    CLOB l_clob;

    ..

    l_clob: ='

    < root >

    < name > ioerio < / name >

    < 10 > < / age >

    < / root >

    ';

    I need to get a XML in a single line without spaces and withoud LF...

    Example:

    SQL > ed
    A written file afiedt.buf

    1 declare
    2 l_clob clob.
    3. start
    4 l_clob: ='
    5
    6 ioerio
    7    10
    8

    9  ';
    10 l_clob:=replace(l_clob,chr(10)); -Remove line breaks
    11 l_clob: = regexp_replace (l_clob, ' > +)<','><>
    12 dbms_output.put_line (l_clob);
    13 * end;
    SQL > /.
    ioerio 10

    Must say, this is a strange requirement.  Most people ask how to do the reverse.

  • Remove the left and right spaces with calculation

    I read in this forum that I can create a SQL expression calculation after 'Send' to remove the spaces to the left. I put in the source: ltrim(:P209_DESCRIPTION), but it did not work. You have another idea to achieve this? Thank you.

    Let us first find what you really use the following to replace all tabs with ' ~' and all the spaces with "%". This will give us a clearer picture of the characters that we have

    Select translate ('asd fd, chr (9) |) Chr (32),'~ %') of the double

    Then, we can use

    Select ltrim (: P209_DESCRIPTION, chr (9) |) Chr (32)) of the double

    for trim tabs and spaces

    Kind regards

    Vishal

    Oracle APEX 4.2 reports | Packt Publishing

    Vishal blog

    Please mark the reply as useful/correct if it solves your problem

  • Running out of disk space and the need to remove the old clichés

    I recently joined a company owning an ESXi 4.1.0 (build 260247) server with 4 500GB data warehouses.  One of our servers main database (Ubuntu/Postgres), which uses only one of the data warehouses (4 datastore) has 21GB 465 GB free.  It is currently configured to store all settings, storage and snapshots on this unique data store.  The hard disk is configured as thin.

    The virtual machine has crashed a few days ago, when it ran out of disk space.  We removed a small second partition (which was in the same data store) and cleared space, but we receive extremely weak with only 5% of the data left store.

    I have read many posts and wanted to get the opinion of this community before I move forward.   Because we do not use the 4.1 last I heard some issues using the option "Remove all" that it may require more disk space and others recommended to manually delete snapshots from the closest to the base, but it seems that in this case it can merge the snapshot with the original without freeing all the space.

    We are not all of the snapshots and I'm fine with delete them, but I assure you we will not run out of disk space in the process and complicate things further.

    It is best to manually remove these snapshots starting with the one closest to the base or by using the "Delete All" (or something else)?  In addition, if we go with the manual option, is it possible with the virtual machine upward or do we need to close first?

    Current snapshots:

    snapshot1.jpg

    Current data warehouses associated with VM (really unique using the 4 data store)

    snapshot2.jpg

    Actual files on the data store 4

    snapshot3.jpg

    Thank you

    Brandon

    Welcome to the community,

    After the screenshot, your virtual disk 'arrow_db1.vmdk' stocked thickness!

    With the thick disc service and ESXi 4.1 (the problem with "Delete All" is related to version 4.0), you can run safely "Delete All". However, due to low disk space, I recommend that do you with the virtual machine off. If turned on, a new temporary snapshot will be created, which - according to the workload of the virtual machine - can grow and fill in the data store.

    Due to the size of snapshot and depending on the speed of your storage space, you need to plan a few hours well downtime.

    André

  • Need to remove the space between &lt; af:panelGrouplayout &gt; and &lt; af:panelBox &gt;

    Hi all

    I use JDeveloper 11.1.1.6.

    My scenario is I need to stretch some fields for all browsers, so I use Panel box inside the < f: facet center = name > panelStretchLayout.

    It works very well. But some scenarios need to display the header above the group box elements. Then I try to add panelGroupLayout in < f: facet = top name >. It is stretching very well, but is always to show space between < af:panelBox >.

    How can I remove the space between < af:panelGroupLayout > and < af:panelBox >?

    My Codes like this,

    < af:panelStretchLayout id = "PSL1" inlineStyle = "" margin-top: 30px; ">"

    < f: facet = 'top' name >

    < af:panelGroupLayout id = "pgl4" layout = "vertical".

    inlineStyle = "" background-color: red; ">"

    < af:panelGroupLayout layout = "horizontal" id = "pgl1" >

    < af:outputText value = 'Day' id = "ot1" / >

    < af:outputText value = "Week" id = "ot2" / >

    < af:outputText value = 'Months' id = "ot3" / >

    < af:outputText value = 'Year' id = "ot4" / >

    < / af:panelGroupLayout >

    < / af:panelGroupLayout >

    < / f: facet >

    < f: facet name = "center" >

    < columns af:panelDashboard = rowHeight '1' = "100%" id = "pd1" >

    < af:panelBox id = "pb1" showDisclosure = "false".

    showHeader = "never" > < / af:panelBox >

    < / af:panelDashboard >

    < / f: facet >

    < / af:panelStretchLayout >


    Thank you...

    Same answer as your other thread need to hide the space between &

    Use firebug to see if a style is the cause because it is not reproduced.

    Timo

  • TB 38.2 remove several spaces on copy and paste

    If I copy the text that contains multiple consecutive spaces, and paste into an email that is being composed in plain text view (I know it is identical to the HTML mode really...), then these are replaced with single characters. For example, copy:

    an an a an a

    It will be pasted as:

    an an a an a

    It is totally reproducible. Is this a known bug? If so, is there an ETA for a fix? It is extremely annoying!

    M_G_W

    Check your settings for the keyboard sticky keys and keys Bouncing and AutoCorrect

  • A special character validation using regular expressions in ADF

    Hi guys,.

    I want to put the validation of a special as character (,.') ((en) &, -) using regular expressions.

    I asked the posting as [a-zA-Z0-9'(.),--/ &] but it does not work properly.

    Special characters should be like:

    Comma,

    Hyfan-

    Dot.

    Open and close braces (and).

    Ampercent &

    Apastrophy '

    Space ""

    Please help if anyone has idea.

    And I also tried to put under expression as...

    [a-zA-Z] + (\\s* [0-9] * [a-zA-Z] *-* & * \\(*\\) *, *'*. *) * [a-zA-Z0-9] + but we need the validation if we put special characters between the charater as "ab," chain "& (bc).

    his does not work if I put a special character at the beginning and the end of the string in the ADF

    Thanks Timo...

    its working fine...

  • Regular expression to remove the space in the HTML tag

    Hi all

    My HTML string is as below.

    Select ' < CityName > RICHMOND < / Nom_ville >< StateCd > ABCD CDE< StateCd / >< CtryCd > CAN < / CtryCd >< CtrySubDivCd > BC < / CtrySubDivCd > ' double Str

    Output desired is

    < CityName > RICHMOND < / Nom_ville > < StateCd > ABCD CDE< StateCd / > < CtryCd > CAN < / CtryCd > < CtrySubDivCd > BC < / CtrySubDivCd >

    I want to remove these spaces of the tag value box with only spaces otherwise leave it as what. Please help to implement the same using regular expressions.

    Hello

    We don't know what you want.  This site seems to be formatting your message in a weird way.

    As the statement

    SELECT «...» "THE DOUBLE;

    without formatting, to show your entry and after the exact output desired friom as, with as little in shape as possible.  It might be useful if you use some character like ~ instead of spaces (just for viewing; we will find a solution that works for spaces).

    To remove the text which consists of spaces and nothing else between the tags, you can say

    REGEXP_REPLACE (str

    , '> +<>

    , '><>

    )

    How is this string generated?  Maybe there is an easier and more effective way to keep the bad wrtings sub off the chain in the first place.

Maybe you are looking for