Search and replace values in the text field before the values are stored in DB

Hello
There is a question - answer and text box text field - in my application. Problem is, some of the answers are stored with the apostrophes to the DB and I have a problem while recovering in the DB. I need to replace the single quotes 1 with 2 apostrophes. The values are stored in the DB when you click on the submit button.

So, I'm using the following javascript code:
italics
< script type = "text/javascript" >
function test().
{
var str = "& P2_S1.";
document. Write (Escape (STR));
}
< /script >
italics
I need to call this javascript function, when the user clicks on the button submit, but BEFORE the values are stored in the DB. How can I get this done?

Please let me know.

Hi Suzi,

Just use

begin
update test set S1=replace(:P2_S1, '''', '''''') where name=:APP_USER;
end;

as you did in your SELECT statement.

But I shake also why you want to do? Where do you have problems with the apostrophe?

Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

Tags: Database

Similar Questions

  • GREP: Search and replace

    Does anyone know if its possible to take a list (shown on the lower part of the image) and run a GREP search and replace to create the list of tabs (shown on the picture)?

    I know that the majority of it can be made with the regular search and replace: separate the first and last name; MD and MD #; Postal code and telephone number.

    What I was not able to understand is how to add a tab forward and backward the state abbreviations 2-digit, the Middle Initial, phone number and more important even if there is a way to add tabs in when there aren't the same amount of lines, such as the field of specialty.

    I know that I can use the GREP search and replace to add a tab before each paragraph back, then remove the tab where there are 2 paragraph after each game returns, then substituting a tab and a paragraph back to just a tab, together running all the rows in each set.

    Any help would be greatly appreciated, and if there is anywhere I can learn more about GREP, I would love to learn it.

    Thank you

    Peter

    Doctors List Styles.png

    Peter, try this...

    Find:------.<>

    Replace: \t$0

  • RegExp search and replace, keep the formatting of the original text

    Hello!

    Will have to perform the Search and replace within a framework of text using RegExp.

    And to retain the original formatting of the text block.

    How is it possible?

    Bad example-, it converts all the text formatting to the format of the first character:

    var reg = /a/gmi;
    var replacer = '*';
    var fr = activeDocument.textFrames[0];
    fr.contents = fr.contents.replace (reg , replacer);
    

    find_and_replace_regexp.jpg

    Thank you!

    I has not yet been tested your code.

    But why you did not play with my code snippet, use something like this:

    // regex_changeContentsOfWordOrString_RemainFormatting.jsx
    // regards pixxxel schubser
    var s = /arguments/gi;
    var replacer = "other string", result;
    var atf = activeDocument.textFrames[0];
    
    while (result = s.exec(atf.contents)) {
        try {
            aCon = atf.characters[result.index];
            aCon.length = result[0].length;
            aCon.contents = replacer;
            } catch (e) {};
        }
    

    Try it and have fun

  • How can I use search and replace to replace the title of the doc with copy of the h1 content?

    I have a site with about 300 pages which have the same title. I need to replace this title by the same text that appears in the h1 tag on the page (each page is different). Of DW search and replace it? If so, how? I don't really want to go have to go to each page and copy/paste.

    jeffsure wrote:

    Is there a way to tell him to put only the first h1 tag in the title?

    I'm really motivated now to learn regex!

    Yes. Just use the following regular expression instead of the previous:

    ([^<>[\S\s]+?

    )([^<>

    The field is to replace the same.

    The question mark is the [\S\s]+ a lazy search, stopping at the first]

    rather than doing a greedy research that concludes the last

    in the page.

    The regex for learning is difficult, but it can be very rewarding. I would only like the best.

  • I can't seem to make the "search and replace string" works as expected.

    I tried to replace "^ []] +---+ ([^] +).» "$*" with $1 in "create table leq_octave_5min (recorded_time DATETIME CONSTRAINT pk1 PRIMARY KEY, leq5m leq5m of FLOAT CONSTRAINT NOT NULL, min min FLOAT CONSTRAINT NOT NULL, max max FLOAT CONSTRAINT NOT NULL, CONSTRAINT of FLOAT L05 05 NOT NULL, CONSTRAINT of FLOAT L10 10 NOT NULL, L50 FLOAT CONSTRAINT 50 NOT NULL, L90 FLOAT 90 CONSTRAINT NOT NULL. L95 FLOTTER CONSTRAINT 95 NON NULL, us01 us01 FLOAT CONSTRAINT NOT NULL, EN02 EN02 FLOTTER CONSTRAINT NOT NULL, fr03 FR03 FLOTTER CONSTRAINT NOT NULL, fr04 FR04 FLOTTER CONSTRAINT NOT NULL, fr05 FR05 FLOTTER CONSTRAINT NOT NULL, fr06 FR06 FLOTTER CONSTRAINT NOT NULL, fr07 FR07 FLOTTER CONSTRAINT NOT NULL, fr08 FR08 FLOTTER CONSTRAINT NOT NULL, fr09 FR09 FLOTTER CONSTRAINT NOT NULL, fr10 FR10 FLOTTER CONSTRAINT NOT NULL Fr11 FR11 FLOTTER CONSTRAINT NOT NULL, FR12 FLOTTER CONSTRAINT NOT NULL fr12, fr13 FR13 FLOTTER CONSTRAINT NOT NULL, fr14 FR14 FLOTTER CONSTRAINT NOT NULL, fr15 FR15 FLOTTER CONSTRAINT NOT NULL, fr16 FR16 FLOTTER CONSTRAINT NOT NULL, fr17 FR17 FLOTTER CONSTRAINT NOT NULL, fr18 FR18 FLOTTER CONSTRAINT NOT NULL, fr19 FR19 FLOTTER CONSTRAINT NOT NULL, fr20 FR20 FLOTTER CONSTRAINT NOT NULL, fr21 FR21 FLOTTER CONSTRAINT NOT NULL Fr22 FR22 FLOTTER CONSTRAINT NOT NULL "(, e23, e23 FLOTTER CONSTRAINT NOT NULL, fr24 FR24 FLOAT CONSTRAINT NOT NULL, fr25 FR25 FLOTTER CONSTRAINT NOT NULL, fr26 FR26 FLOTTENT CONSTRAINT NOT NULL, fr27 FR27 FLOTTER CONSTRAINT NOT NULL, fr28 FR28 FLOTTER CONSTRAINT NOT NULL, fr29 FR29 FLOTTER CONSTRAINT NOT NULL, fr30 FR30 FLOTTER CONSTRAINT NOT NULL, status TEXT (2) st NOT NULL CONSTRAINT).

    The goal was to get the third token, 'leq_octave_5min '.

    The result string is "leq_octave_5min", but the real result string is the input string itself.

    What is the problem with my method?

    I'm sorry.

    I forgot to turn on 'regular expressions' in "Search and replace the String" VI.

    After having turned it on, it works as expected.

  • [CS5 JS] excluding the Notes of search and replace

    Hello

    Does anyone know how to exclude all text within a Note of a search/replace, text or grep operation?

    I went through and systematically all the findChangeGrepOptions that had the word "include" in false:

    includeLockedStoriesForFind: false

    includeLockedLayersForFind: false

    includeHiddenLayers: false

    includeMasterPages: false

    includeFootnotes: false

    just to check, but nothing has worked. myText.changeGrep () has again changed the text in the note.

    Of course, it would be pretty easy to write a wrapper function

    var myChangeGrep = function( textObject, checkNotes ) {
       checkNotes = checkNotes || false;
       results = [];
    
      // Go through and run changeGrep on all the 
      // parts of the textObject that are not contained inside Notes, 
      // (or just run it on the entire textObject if checkNotes is true),
      // and push the results to the results array as we go along.
    
      return results;
    };
    

    but it has the disadvantage that it returns a table and not a collection of InDesign, as does the regular changeGrep. In addition, as simple as it may be, it would be easier if there was a preference somewhere to take care of this.

    Any idea?

    Thank you!

    There is no preference for that: the scope of search and replace can be set only with five preferences that you have already tried. (In the same way, you can not include/exclude tables.) findGrep() and changeGrep() return an array, for that matter, not a collection.

  • Advanced search and replace. How to replace the space with carriage return?

    10.9.13.0/24, 10.9.4.2/32, 10.9.4.3/32

    in

    10.9.13.0/24
    10.9.4.2/32
    10.9.4.3/32

    Find replace them ',' with carriage return.

    I still find articles on an advanced search and replace, but I can't seem to locate it.

    OS X El Capitan 10.11.3

    3.6.1 the numbers

    HI Brendan,

    You don't need an advanced find and replace for it.

    In the search box, press, then space.

    In the box replace by, press option-return.

    Then click Find and replace and find until you are finished.

    Kind regards

    Barry

  • Search and replace the string formatting

    Hello

    I try to do a search and replace the formatting of a string.

    In the example, I'm looking for the string 'SUCCESSFUL', but it must also begin by usbflash and some number + PASSED.

    I can't get the format to have a number between 1 and 99. The number of replacements should add up to 6 in this case. I tried with \d for any number, and I also tried [1-99].

    Make a right-click on the function search and replace the string.  There is an option to use regular Expressions.  Then give it a try.

    EDIT: You need to set the entry replace all to TRUE.

  • Search and replace for the color gradients?

    Just discovered new "Find and replace" tool which is very neat. However, I can't make it work with gradients. "Finding" a specific gradient if you replace all the forms with that color with another color United or degraded degraded? (Using Flash CS6; although entry users of old versions of Flash welcome whether applicable...)

    Hi Evilbob0,

    Search and replace for color, supports only solid colors.

    Gradients are not supported (in - Flash Pro CS6 and CC).

    Thank you

    Smriti

  • Try to find the queries of search and replace

    OK, I thought I knew where it was.  I looked at

    C:\Users\phyllis\AppData\Local\Adobe\InDesign\Version 6.0\en_US\Caches
    He has here called FindChangeData and FindChangeDataTmp files, but write them in the folder for the Version 7.5 does nothing.

    So I think I'm looking in the wrong place.  I'm moving all the queries search and replace in InDesign CS 5.5.  Can someone point me to them?

    Thank you, Phyllis

    Try C:\Users\\AppData\Roaming\Adobe\InDesign\------------.

  • Search and replace, unadulterated second character?

    I'm doing a VI that communicates with an external device via a protocol consisting of images. I made a couple of subVIs that put these images together as hexadecimal strings which are then converted into numbers and passed to the device. The protocol uses an escape character to avoid sending a constant BOF or EOF at the wrong time. I did a Subvi, which is supposed to do this by using the search and replace. Initially, it looks quite elegant, but it has a fatal flaw, if one of the characters it is supposed to hide is written on the edge of a byte, it will always be replaced.

    Example:

    11 01 00 CE 0D 05 08 EA

    is replaced by

    11 01 00 05 08 EA 0D E7

    C0, C1, 7 d are the characters to replace, the 7 d is the escape character.

    Now I wonder, is it possible to do a search and replace function search only every second character in a string?

    Hi Tzench,

    Why you do not work with numbers of converts? It should be easier (and safer) to replace some U8 values instead of search (errors) & replace in a string...

    You should also be careful when you give examples. So in your example, the "hex" number is separated by spaces, search & replace should not create problems with "byte-border '!

  • GREP: date/time search and replace

    Hello world

    I frequently import XML files into InDesign. The XML structure always contains the following, among others:

    start date

    start time

    end date

    end time

    For example, it looks like this:

    21.08.2013

    09:00

    25.08.2013

    18:00

    Now, I need to reorder these fields in a single line, like this:

    21.08.2013, 25.08.2013, 09:00-18:00

    I already found a way to do it through GREP, but I need to go one step further:

    If the "start date" and "end date" is the same (for example, both are "21.08.2013"), I would like to move the "end date" in the output. It should look like this:

    21.08.2013, 09:00 - 18:00

    Is it possible to do it through GREP?

    Thanks in advance!

    This will do

    Trevor

    // By Trevor http://forums.adobe.com/thread/1261365?tstart=0
    app.doScript("formatDates ()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "GREP: date/time search and replace");
    function formatDates ()
        {
            app.findGrepPreferences = app.changeGrepPreferences = null;
            app.findGrepPreferences.findWhat = "\\d\\d\.\\d\\d\.\\d\\d\\d\\d\r\\d\\d:\\d\\d\r\\d\\d\.\\d\\d\.\\d\\d\\d\\d\r(?=\\d\\d:\\d\\d\r)";
            var doc = app.activeDocument,
                  dateFinds = doc.findGrep(),
                  l = dateFinds.length, dates;
            while (l--)
                {
                    app.findGrepPreferences.findWhat = "(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)";
                    dates = dateFinds[l].findGrep();
                    app.findGrepPreferences.findWhat = "(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)\r(\\d\\d:\\d\\d)\r(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)\r";
                    if (dates[0].contents == dates[1].contents) app.changeGrepPreferences.changeTo = "$1 $2 - ";
                    else app.changeGrepPreferences.changeTo = "$1 $2 - $3 ";
                    dateFinds[l].changeGrep();
                }
        }
    
  • Illustrator search and replace

    Hello

    Can someone tell me if it is possible to function JavaScript illustrators search and replace text?

    I know that it is possible in InDesign, but I can't find anything for Illustrator.

    Thank you very much

    Nik

    Hi Nik, no need to dig down to the words, we search the whole textFrame.contents. Here's a working example

    var active_doc = app.activeDocument;
    
    var search_string = /blah/gi; // g for global search, remove i to make a case sensitive search
    var replace_string = "lalala";
    
    var text_frames = active_doc.textFrames;
    
    if (text_frames.length > 0)
    {
        for (var i = 0 ; i < text_frames.length; i++)
          {
              var this_text_frame = text_frames[i];
               var new_string = this_text_frame.contents.replace(search_string, replace_string);
    
               if (new_string != this_text_frame.contents)
                   {
                        this_text_frame.contents = new_string;
                   }
          }
    }
    
  • Search and replace Question

    I would like to find text in a document and add a space at the beginning of a style. I can't simply replace text because its different text throughout the book. Is there a way to invke the Clipboard in one search and replace? For example...

    If ^ c were the command to copy and paste the selection yould be able to use

    ' ^ m ^ p ' in the section replace, add a space in the world, it finds my search criteria.

    One more thing, im stuck semi with CS3 to do this and would like to keep in CS3, but might, if I'm using CS4 and then export to CS3... new id really prefer does not however.

    I think you're going to need two styles, one for the first paragraph of the quotation and the other for the following paragraphs in the citation. What you do universally for the style, if you have only one, will affect all paragraphs with this style.

    You never responded to my previous questions as these quotes don't in running text or separate executives. If they are in the text running there is no reason to use the paragraph NET, unless you want to push the line down, at the top of a column (which, in my opinion is ugly and one of the main arguments against the addition of an empty paragraph). The space is a better and simpler choices. If the quotes are in separate frames, you can adjust the Insert at the top of the page text to push. You don't need anything special at all (nor a second style), and you can save as part of a style object.

    Overall, my response to this question is that you approach the problem from the wrong direction. It's just a matter of definition of style, if style paragraph or style object and find/replace should play no role, except perhaps to allow you to easily locate the quotes to change the style of the first paragraph. You'll still need to do them one by one, but find the change can locate all so you do not need to go page by page.

  • change font and font size in all text fields

    Hi, I want to change font and font size in all text fields. I tried under the code, but it changes the font size but has not changed the font. can u pls help me. Thank you...

    Police - Courier New

    the size of the font - 10

    Loop through the fields in the document

    for (var i = 0; i < numFields; i ++) {}

    Get a reference to the current field

    var f = getField (getNthFieldName (i));

    Change the properties of certain types of fields

    {Switch (f.type)}

    case 'text ':

    f.textFont = fonts. Courier New;

    f.textSize = 10;

    }

    }

    You have a good reason to want to use Courier New instead of the built-in Courier font? In all cases, you must change one line to:

    Use the built-in font Courier

    f.textFont = fonts. Court;

    -or-

    Use the Courier New

    f.textFont = "CourierNew;

Maybe you are looking for

  • Cannot receive mail from Holiday Inn

    I get emails from confirmation of Holiday Inn.  Even if I transfer their e-mail from a different e-mail address, I don't get them in iCloud.  It made me mad this morning and I did SEVERAL tests.  Finally, I did send to my work account and received im

  • Problems with closing

    My laptop will not stop or restart. It seems to just go in the mode 'sleep' and then drains my battery. What can I do?

  • structure of flat sequence for benchmarking

    Hello Maybe this is very obvious, but I don't completely understand something with the sequence flat structures-FSS (I never use this structure by the way and I don't you not why they use it in this example). There's a doc OR online explaining some m

  • TestStand deployment utility error

    I get the error below in an attempt to build a TestStand deployment.  I'm under TestStand 4.2.1.83 and 9.0.1f3 Version of LabVIEW 2009 Service Pack 1.  Any help would be appreciated, because I can't find the screws mentioned in error.  Thank you! Fro

  • Can't send or receive messages for the Hotmail (rjohnson_77_7) account.

    Can't send or receive messages at this timeWindows Live Mail error ID: 0x8DE20007