Replace special characters

Hello

I need SQL or PL/SQL code to replace special characters such as!, @, #, $, %, ^ of the given string.

For example, if the given string is

"it is - test * strin #g to @ spe % ial charact!" ERS"he should replace all special characters and provide the output voltage

It's test string with special characters

Please enter the code

Thank you

You have commas in the character set block and the [[: alnum:]] is equivalent to [a-zA-Z0-9], you may want to include a space in this updated chacter block.

Select REGEXP_REPLACE ("This is test * strin #g to @ spe % ial charact!") ERS ',' [^ [: alnum:]] *', ")

of the double

Output

It's test string with blue characters

EDIT: I do not know what will want the characters allow the OP. For example, a comma, question mark, comma, colon, apostrophe, full stop etc. are all valid in a sentence.

Tags: Database

Similar Questions

  • Replace special characters in the FDF

    Hello

    I've looked everywhere and can't find the answer to this simple problem.  I can handle javascript in an HTML environment using free scripts, but it is not so easy in a PDF form.  I use Adobe Acrobat 9 Pro and I have a form that once completed and submitted, generates and sends a FDF file.  I use a script on the server side, called FormGenie do this and the script hate parentheses and some other characters, they break the FDF file.  Everything I want to do is set up a document level Javascript that find and replace all instances of these special characters with something license as a hyphen - or just a space.

    I tried:

    function clearText() {}
    document. FormName.FieldName.Value = filterNum (document. FormName.FieldName.value)

    function filterNum (str) {}
    re = /\$|#|~|\%|\*|\^|\(|\)|\+|\=|\[|\]|\[|\}|\{|\;|\"|\<|\>|\?| \|| \\|\!| \$/g;
    remove special characters as ' $' and ',' etc...
    return str.replace (re, "-");
    }
    }

    and

    function clearText2 (str) {}

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

    I know that these are not good, but I have to be at least barking to the top of the tree on the right.

    Can anyone help?

    Thank you

    You create the form in Acrobat or LiveCycle Designer?

    In general, you can place a script typo in the script of the text of each filter field field hit, in the case where something replacing the user typed with something else would not cause the concern of the user. An alternative would be to be implemented a script that parses the fields just before the submission form action takes place and not to replace them.

    For example, you can use the following JavaScript typo customized for text fields created in Acrobat:

    If (! event.willCommit) {}

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

    }

    and it will replace these characters when the user types the data into a text field. May not include all the character you want replaced, but you should get the idea.

  • Replacing special characters

    I have a page with a javascript tip which is fed with elements of a database query. Some of the results have special characters that my with the javascript syntax, in fact only 3 of them.

    Single quote, double quote and------.

    If I set & #34; in the database, it displays as a double in the ToolTip without problem, so what I want to do is to replace all occurrences of "with & #34;" and even with the others. The------should be replaced by------to view. I find it hard to do... any suggestions would be helpful... Here's my current attempt...

    < cfset temp = Replace (tester.loc_notes, ' "',' & #34;', 'ALL'") >

    Thank you

    If these quotes are displayed to the user, use " ", " or HTMLEditFormat().

    It is difficult to be more precise, unless you attach the code in question.

  • replace special characters in sql select

    Hello

    I have a little problem with one colunm blob in a db.

    A blob contains a text with decimal characters (an application writes this colunm in HTML), for example:

    Kedves Koll & #233 g & #225; k!

    & #193; He's & #225; sfoglal & #225; sotokat k & #233; RJ & #252; k a csatolt panasz & #252; gyben (PI-1167/2014.).

    & #220; gyf & #233; ladatok

    n & #233; v: lives & #225; RIS Anetta

    How could I replace the decimal characters with ascii characters?

    Thans a lot

    set define off

    SELECT UTL_I18N. UNESCAPE_REFERENCE ('Kedves Kollegak!)

    Allasfoglalasotokat Kerjuk a. csatolt panaszugyben (PI-1167/2014.)

    Ugyfeladatok

    Nev: Anetta Vitaris') FROM dual

    UTL_I18N. UNESCAPE_REFERENCE('KEDVESKOLLéGáK!) Allasfoglal & #225

    --------------------------------------------------------------------------------

    Kedves Kollegak!

    Allasfoglalasotokat Kerjuk a. csatolt panaszugyben (PI-1167/2014.)

    Ugyfeladatok

    Nev: Vitaris Anetta

    1 selected line.

  • What happened to search for and replace special characters

    I'm a recent update of FrameMaker 9 FrameMaker 11. I use several notations with nonbreaking hyphens and nonbreaking spaces. In version 9, I was able to use the hexadecimal codes in the Find/Replace dialog box and search and replace these ratings. Now in version 11, it does not find these characters. I end up getting more I want.

    For example: I want to find

    (E Vote, September 12, 2008)

    This text has a non-breaking hyphen and showing spaces are nonbreaking. When I entered the document these characters, I used the combination of keys "Esc hyphen:" for the hyphen and "Ctrl + space" for spaces.

    When I enter "(E\x15Vote\x10Sept.\x1012,\x102008)" and press the button Search, FrameMaker converts the text to "(E\+Vote\s#Sept.\s#12,\s#2008)" and refers to a "Not Found" statement. I get the error even if I copy the text and paste it into the Find/Replace dialog box. I tried with "Deal", "use wildcards" and whole-word checks both market. I can't find it.

    Honestly, I never noticed if verstion 9A made the conversion of \x15 to------+ and dialog of \x10 to \s#, in the search/replace because he always found what I was looking for.

    I hope someone can tell me how to solve this problem, because it is a feature I use all the time in FrameMaker. I use hyphens and nonbreaking spaces everywhere in my documents.

    I also reported this as a bug because that's what happens if feels like to me. I went out and updated my installation of FrameMaker, thinking that this may have been reported and already corrected.

    A sad FrameMaker user

    Chris

    I'm not sure that's what you're looking for, but you might.

    Copy your text ' E-voting, September 12, 2008'.

    Go to Find/replace

    Select text and character Formats Clipboard from the drop-down

    Click on Search.

  • Replacing special characters with its actual value

    Hi all

    Anyone have an idea how to replace an extended character (ASCII ranging from 128 to 255 value) for its actual character set in SQL/PLSQL?

    For example: '½' should be replaced on a "1/2".
    '¼' should be replaced with "1/4"

    Ultimately if the value is "California 71 ½" then the result should be "California 71 1/2". "."

    Thanks for your time!

    Kind regards

    REPLACE the function?

    SQL> select replace('California 71 ½', '½', '1/2') from dual;
    
    REPLACE('CALIFORNIA71½','½','1
    ------------------------------
    California 71 1/2
     
    
  • Replace special characters in a string

    Let's say that someone copies the list as follows and the glue in a Javascript dialog box:

    302304

    305678

    245675

    How do I manipulate the string so that it reads:

    302304 305678 245675

    In other words, how to replace manual line breaks in a string with spaces?

    Thank you!

    It's the cleanest method that you are looking for:

    /[\n\r]/
    

    In this case, even a simple \s would work, but it's maybe not what the OP...

    Substances

  • Replacing special characters when writing to a file

    I use the following to replace Muñoz (n with null).  It should produce as Muoz.

    This should be simple, but it does not work.  209 and 241 represent the upper and the lower case n.

    This statement is a CFFILE.  I'm generating the file but the n is still there.

    Replace (LGL_NM, Chr (209) & chr (241),'3 ', 'all')

    I also tried without success the following:

    < cfset x = ReplaceNoCase(#Object_query.) LGL_NM #, "#Chr (209) # ',' ', 'all') > '"
    < cfset LGL_NM = ReplaceNoCase (x, "#chr (241) #","", "all" "") >

    Help, please.

    Thank you!

    Bill



    #REReplaceNoCase (testString, "[#chr (209) ##chr (241) #]", "", "all") #.

  • Reports character - special characters

    Hi!, I have a problem, I am using character mode report and it creates a PostScript in UNIX, reports creates a bar code with a function, but this function has special characters and the system automatically replaced by '? 'or '! '.

    The function is:

    FUNCTION F_GETBARCODE(pv_digitos_afip  IN VARCHAR2) RETURN VARCHAR2 IS
      --
      ln_len NUMBER;
      lv_pair VARCHAR2(50);
      lv_codebar VARCHAR2(50) := '{';
      --
      TYPE ARRAY_T IS VARRAY(101) OF VARCHAR2(10);
      ARRAY ARRAY_T := ARRAY_T('!','"','#','$','%','&','''','(',')','*','+',',','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F',
                                                    'G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[','\',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l',
                                                    'm','n','o','p','q','r','s','t','u','v','w','x','y','z','¡','¢','£','¤','¥','¦','§','¨','©','ª');
    BEGIN
      --
      SELECT LENGTH(pv_digitos_afip)/2
          INTO ln_len
         FROM DUAL;
      --
      FOR i IN 1..ln_len LOOP
        --
        SELECT SUBSTR(pv_digitos_afip,i+i-1,2)
            INTO lv_pair
            FROM DUAL;
        --
        lv_codebar := lv_codebar||ARRAY(TO_NUMBER(lv_pair+1));
        --
      END LOOP;
      --
      lv_codebar := lv_codebar||'}';  
      --
      RETURN lv_codebar;
    END;
    

    If the number is, 909192 him forge function returns {¢ £}, but returns {!}

    The problem is with this "" characters, "¢", "£",'¤ ', ' ¥ ', '¦', ' § ', '¨', 'to', 'ª', I can't create the barcode without solution or ¿Some ideas because. ?


    Thank you cordially.

    I solved the problem in UNIX with this script, replacing special characters:

    SED s/special_1-i / /' $salida

    SED s/special_2-i / ¢ /' $salida

    SED s/special_3-i / £/ ' $salida

    sed-i of/special_4 / ¤ /' $salida

    SED s/special_5-i / ¥ /' $salida

    SED s/special_6-i /... /' $salida

    SED s/special_7-i / § /' $salida

    SED s/special_8-i / ¨ /' $salida

    sed-i of/special_9 / © /' $salida

    SED s/special_10-i / ª /' $salida

  • Replace sepcial characters in a Server stored on via PLSQL

    Hi Experts,

    I have a requirement in which I need to replace special characters by alphabets in a file stored on the server in a directory.

    EG - symbol € with E

    symbol (at) with @.


    I want to do this via a Pl Sql stored procedure.

    I tried and script worked great for small files, but it is a failure for large files.


    for your Script reference, I've been trying-


    DECLARE

    l_tmp_blob by DEFAULT EMPTY_BLOB() BLOB;

    l_bfile BFILE.

    l_dest_offset INTEGER: = 1;

    l_src_offset INTEGER: = 1;

    l_file_content VARCHAR2 (32767).

    l_outfile UTL_FILE. TYPE_DE_FICHIER;

    BEGIN

    l_bfile: =.

    BFILENAME ('TEST_ATTACH ','TEST_ZERO_SIZE.txt '

    );

    DBMS_LOB. OPEN (l_bfile, DBMS_LOB.file_readonly);

    DBMS_LOB.CREATETEMPORARY (l_tmp_blob, TRUE);

    DBMS_LOB.loadblobfromfile (l_tmp_blob,

    l_bfile,

    DBMS_LOB.lobmaxsize,

    l_dest_offset,

    l_src_offset

    );

    DBMS_LOB. CLOSE (l_bfile);

    BEGIN

    SELECT mob_util_pck.blob_to_varchar (l_tmp_blob)

    IN l_file_content

    Double;

    END;

    Start

    mob_util_pck. DELETE_FILES ("TEST_ATTACH",

    'TEST_ZERO_SIZE.txt '.

    );

    END;

    l_file_content: = REPLACE (l_file_content, ' €', 'E');

    l_file_content: = REPLACE (l_file_content, ' @', '(at)');

    l_file_content: = REPLACE (l_file_content, '&', '+');

    l_file_content: = REPLACE (l_file_content, 'to', 'a');

    l_file_content: = REPLACE (l_file_content, 'e', 'e');

    l_file_content: = REPLACE (l_file_content, 'e', 'e');

    l_file_content: = REPLACE (l_file_content, c ","c");

    l_file_content: = REPLACE (l_file_content, 'e', 'e');

    l_file_content: = REPLACE (l_file_content, 'u', 'u');

    l_file_content: = REPLACE (l_file_content, 'e', 'e');

    l_file_content: = REPLACE (l_file_content, 'i', 'i');

    l_file_content: = REPLACE (l_file_content, ' \', ' / ');

    l_file_content: = REPLACE ([l_file_content, '] ',')');

    l_file_content: = REPLACE (l_file_content, ' ^ ','.');

    l_file_content: = REPLACE (l_file_content, '_', '-');

    l_file_content: = REPLACE (l_file_content, "',"');

    l_outfile: = UTL_FILE. FOPEN ('TEST_ATTACH', 'TEST_ZERO_SIZE.txt', 'w');

    UTL_FILE. PUT (l_outfile, l_file_content);

    UTL_FILE. FCLOSE (l_outfile);

    END;

    /

    Please help me with this.

    Regards-

    Vikrant

    I'm testing with CLOB, but I don't know if I can REPLACE on CLOB and write a file with the CLOB.

    REPLACEMENT work, UTL_FILE doesn't.

    You can use, for example:

    DBMS_XSLPROCESSOR.clob2file (l_tmp_clob, 'TEST_ATTACH', 'TEST_VIKS1108062013115301.xml');

  • Need to replace specific characters of columns

    Hello.

    I searched the forum and found examples to follow, but I'm stumped. I am using regex_replace to replace special characters in a column with a space. The characters are as follows: #/--------| <>* $?; :, @' ^

    I got this close:
    SELECT NAME,
    REGEXP_REPLACE (NAME, ' [#/--------| <>* $?;:, @^] ',' ')
    OF PRODUCT_DESIGNS

    My problem is: How can I replace the apostrophe? I can't make it work in the same REGEX_REPLACE like all the other characters.

    Thanks for your time.

    Dan

    Hello

    TRANSLATE is more effective than REGEXP_REPLACE to do this:

    SELECT     name
    ,     TRANSLATE ( '#/\|*$?;:,@^'''
                , '             '
                )
    FROM    product_designs
    ;
    

    To include a single quotation mark in a string literal, use two of them in a row.
    Notice how the first argument to TRANSLATE above:

    ,     TRANSLATE ( '#/\|*$?;:,@^'''
    

    is written with 3 consecutive single quote at the end characters. The first two show a single quotation mark in the literal and the third one ends the literal.

    You can also use Q-rating to include a single quotation mark in a string literal:

    ,     TRANSLATE ( q'<#/\|*$?;:,@^'>'
                ,  '             '
                )
    

    Published by: Frank Kulash, August 20, 2010 12:03
    Added example of scoring Q

  • Special characters: Angle symbol

    Hi, I am trying to find the symbol 'angle' commonly used in mathematics (two lines forming an angle of 45 degrees, an acute 'L')

    The answer previous (linked) says to do the following

    -Edit

    -Special characters

    -Math (etc.)

    However, this is an old post and now this option seems unavailable.

    Seems to be replaced by 'Emoji and symbols' However the closest I can find in this list is "⎳".

    I sincerely hope that I have not only lack. Thank you

    Execution of Yosemite 10.10.3

    angle geometry symbol, can it be typed? Which character keyboard or the police?

    Emoji & symbols is just a new name for special characters.

    Did you click on the toothed wheel and customize and add mathematical symbols?  I see ∠ to U + 2220.

  • Tag HTML special characters

    Hi all

    I have a news rss application where I get some special characters in the stream. I have addded '"tag to the text, so the label analysis as a web page. The problem is that when the text contains special characters like "o" or similar BB ignores it and doesn't show anything.

    An example will show better:

    QString title = "Hello text: ó";
    Label *l = Label::create();
    l->setText(""+title+"";
    

    The expected result is:

    Hello text: o

    The actual result is:

    Hello the text:

    Best regards.

    Seems that Yes. Or rather an incomplete implementation.

    Numeric codes seems to work well. If you need to use a tag a possible workaround is something like this:

    title.replace("Ó", "Ó");
    title.replace("ó", "ó");
    

    Replacement of the other HTML entities may be necessary as well, here is their list:

    http://www.w3schools.com/tags/ref_entities.asp

  • SLM2048 - problems of password with special characters

    Hi all

    We´ve got a SLM2048 in use (more updated FW) and I wanted to ask our new standards of password on this switch. So I changed the password for the admin user and used special characters, that were = &! = and clicked on update and save the changes. Now, I know that I should use alphanumeric characters only, but why are there no routine that checks the IPL for compliance before writing it on the switch.

    Problem now is that I'm unable to open a session and Don t want to do a hard reset, because the pattern would be lost. I know it should be a user admin rescue, but there is none.  What can I do now? Any chance that a cisco engineer could get in touch with me to debug the password entered in the laboratory and then, who could tell me what was recorded in ROM or how I can connect again?

    Thank you

    Philippe

    Hello

    I will ask our PM on a routine that checks for characters and whether or not they are acceptable for the system.  We should also make this more clear in the Administrator's guide.

    Just thinking out loud here... If she had the character, I wonder if he he replaced by a space, stars or a different character.    Have you tried with spaces where special characters have been?

    HTH,

    Andrew Lissitz

  • BlackBerry smartphones getting special characters on the letters: torch

    Normally on a PC, you use the alt key and the number keys to set a certain brand on a letter, that is to say an accent sign an e. How do I do that on my BB torch

    On your torch, with the help of hard slide on the keyboard, press and HOLD the desired accented letter or a special character and do scroll the trackpad horizontally (on the side) and you will see the special characters.

    On the touch keyboard, simply touch and hold the contact for a few seconds and the replacement characters will be displayed, to choose.

Maybe you are looking for