Extract from text field

Oracle 10. Can I extract just the phrase "in honor of Mr. James Smith" from a field that reads "Gift of $500 to the Brown Fund in honor of Mr. James Smith and $200 to the Connors Fund".
In most cases, the text will not include a second gift and the honor phrase will be at the end like this: "Gift of $500 to the Brown Fund in honor of Mr. James Smith" but there may be a second gift as in the first example.

Hi,
Try this This should work.
SQL> WITH T
  2       AS (SELECT 'Gift of $500 to the Brown Fund in honor of Mr. James Smith and $200 to the Connors Fund'
  3                     str
  4             FROM DUAL
  5           UNION ALL
  6           SELECT 'Gift of $500 to the Brown Fund in honor of Mr. Joe Chan and $200 to the Museum Fund'
  7                     str
  8             FROM DUAL
  9           UNION ALL
10           SELECT 'Gift of $500 to the Brown Fund in honor of Mr. Paul Townsend and $200 to the General Fund'
11                     str
12             FROM DUAL
13           UNION ALL
14           SELECT 'Gift of $500 to the some Fund in honor of Mr. Jon Peters' FROM DUAL)
15  SELECT REGEXP_REPLACE (REGEXP_SUBSTR (str, 'in honor of [^$]+', 1, 1), ' and $') str
16    FROM T;
STR
in honor of Mr. James Smith
in honor of Mr. Joe Chan
in honor of Mr. Paul Townsend
in honor of Mr. Jon Peters
SQL> G.

Similar Messages

  • Tabbing from Text Field to Text Field in Bin

    When entering text in a bin (for example, renaming a subclip), how can I tab from text field to text field (for example, if I ‘d like to add something to the comment column after renaming the subclip) without having to resort to my mouse? In other words, what is the keyboard shortcut?
    Martin
    ¿why ask why?

    Well, OK, that's interesting, Nick, but it seems to add steps rather than remove them and I still need to jump to my mouse. As best I can tell, CMD+9 always takes me to the Format tab. It appears I can't tab over to the Logging tab; I have to use my mouse.
    Then I have 37 fields (yep, I counted 'em) to wade through looking for the one I want to change. My custom bin setting only has the fields I care about. It would be easier to use my mouse to click on the field I want to edit without leaving my bin for the Properties window.
    I was just hoping there was a keyboard method.
    Martin

  • Text Area steals Focus from Text Field when selected with mouse

    I have created a very simple form with 4 spry validation elements here :: http://octopusdesign.net/contactus.html
    When I attempt to select the 'Your Email' text field using the mouse, focus is grabbed by the text area above it.
    It is only possible to get focus on the 'Your Email' text field by using tab.
    My best guess is that this is a bug in the framework.
    In addition to updating my spry libraries to 1.6 from 1.4 I've tried the following things::
    Reordering the elements in the form.
    Creating the elements in a different order.
    Replacing the validation elements with ordinary elements.
    None of these fixed the problem.
    Strangely, if I remove the validation text area there is no problem.
    If anyone can shed some light on this I would really appreciate it.
    Wisdom gratefully received.
    Chris

    Furthermore ::
    I've tried to reconstruct the form from scratch and discovered that if you have a validation text field and a validation text area in any order on the form, selecting the 2nd element with the mouse always results in the first element stealing the focus.

  • Create PDF from text fields in website

    Hi!
    Is it possible to hook up text fields in a website to a PDF document?
    I have a website developed in Dreamweaver/asp and I would like the ability to create
    a PDF based on values from different text fields (10-12).
    Today we first insert the values to a webpage and then insert the same values to a PDF
    made in Live Cycle, I'm thinking there have to be a way to automate this process.
    Regards,
    Christian

    Hi Christian,
    I am moving this over to our form gurus in hopes they can assist you!
    Regards, Stacy

  • How to generate barcode from text field in adobe form???

    hello everyone,
    I'm new in this forum and I hope that there are people who can answer my question.
    I use Adobe Acrobat Pro 9. I have converted a Word template to a PDF template and everything works fine.
    I would like to generate a barcode of the contents of a text field (by the users), for example the following format 0123-A123456-11.
    I have tried in various ways but it has not worked. The barcode becomes unstructured and unreadable.
    Does anyone know how to do it step by step?
    Best regards!
    Nader from Sweden

    Hi,
    You can insert dynamic barcodes into your form using LC Designer. 
    You should do a search here as dynamic barcodes has been covered by by Steve Walker in detail. For example:
    BARCODE 128 - possibility of binding 2 data fields to the barcode
    Paperforms barcodes
    Using Barcode in Acroforms
    However one thing to bear in mind is that dynamic barcodes will not work in Reader unless the form has been Reader enabled using LC Reader Extensions ES2, which is a server product. Option 4 in this summary:
    Good luck,
    Niall
    Assure Dynamics

  • JTextArea How do I add text on a new line from Text field

    I want to put each new input from the text field at the start of a new line and keep the previous entries at the start of their
    own line.
    I'm doing this but need help with the new line.
    jTextArea1.setLineWrap(true);
    jTextArea1.setWrapStyleWord(true);
    jTextArea1.setEditable(false);
    public void textProcess()
    System.out.println(sourceref1.getSourceText());
    jTextArea1.setText(jTextArea1.getText()+" "+source.getSourceText());
    The above just keeps adding on the new text until I reach the word wrap limit.
    Thanks

    Maybe you should use the escape character. Anyway, you can consider use append(text:String) instead of getText() everytime.
    Eg:
    jTextArea1.append("\n"+source.getSourceText());

  • Getting a zero value from text field

    Hi,
    The form has 3 text fields for Freight areas, the viewer inserts "1" in the field that is applicable to their area.
    The first 2 fields have a cost of $10.00 and $15.00 and the third is for pick up so there is zero cost. If they insert "1" in either of the 2 fields, it shows up as 1 in the returned email to to the site owner and to the viewer but I can't get the free freight field to display anything in those returned emails.
    I've included the PHP form handler file and the site address is: http://www.hamdenestate.co.nz/test-site/contact-us.html
    Thanks.
    <?php
    $errors = '';
    $myemail = '[email protected]'; //<-----Put Your email address here.
    if(empty($_POST['name'])  ||
       empty($_POST['email']) ||
       empty($_POST['address']))
    $name = $_POST['name']; 
    $email_address = $_POST['email'];
    $phone = $_POST['phone'];
    $address = $_POST['address'];
    $addresstwo = $_POST['addresstwo'];
    $addressthree = $_POST['addressthree'];
    $wine1= $_POST['wine1'];
    $wine2= $_POST['wine2'];
    $wine3= $_POST['wine3'];
    $wine4= $_POST['wine4'];
    $wine5= $_POST['wine5'];
    $wine6= $_POST['wine6'];
    $chardonnay_2011_bottles = $_POST['PROD_Chardonnay2011Bottles_20'];
    $chardonnay_2011_cases = $_POST['PROD_Chardonnay2011Cases_204'];
    $pino_gris_2011_bottles = $_POST['PROD_PinoGris2011Bottles_21'];
    $pino_gris_2011_cases = $_POST['PROD_PinoGris2011Cases_228'];
    $sauvigon_blanc_2011_bottles = $_POST['PROD_SauvigonBlanc2011Bottles_20'];
    $sauvigon_blanc_2011_cases = $_POST['PROD_SauvigonBlanc2011Cases_204'];
    $riesling_2012_bottles = $_POST['PROD_Riesling2012Bottles_20'];
    $riesling_2012_cases = $_POST['PROD_Riesling2012Cases_204'];
    $pinot_noir_2009_bottles = $_POST['PROD_PinotNoir2009Bottles_25'];
    $pinot_noir_2009_cases = $_POST['PROD_PinotNoir2009Cases_250'];
    $message = $_POST['message'];
    $freight_bottles = $_POST['PROD_FreightBottles_10'];
    $freight_cases = $_POST['PROD_FreightCases_15'];
    $freight_Free = $_POST['PROD_FreightFree_0'];
    $totalcost = ($chardonnay_2011_bottles * 20 + $chardonnay_2011_cases * 204) + ($pino_gris_2011_bottles * 21 + $pino_gris_2011_cases * 228) + ($sauvigon_blanc_2011_bottles * 20 + $sauvigon_blanc_2011_cases * 204) + ($riesling_2012_bottles * 20 + $riesling_2012_cases * 204) + ($pinot_noir_2009_bottles * 25 + $pinot_noir_2009_cases * 250) + ($freight_bottles * 10 + $freight_cases * 15 + $freight_free * 000.00);
    $reply = $_POST['email'];
              $replysubject = "Auto-Reply: From Hamden Estate Website";
              $replyfrom = "From:  [email protected]\r\n";
              $replymessage = "Dear ".$_POST ['name']."\r\n\r\n";
              $replymessage .= "Thank you for placing an order with Hamden Estate vineyard. We will contact you shortly with a reference number and payment details...\r\n\r\n";
              $replymessage .= "";
              $replymessage .= "YOUR ORDER DETAILS:\r\n\r\n";
              $replymessage .= "Wine Selection: $wine1\r\n";
              $replymessage .= "Bottles: $chardonnay_2011_bottles\r\n";
              $replymessage .= "Cases: $chardonnay_2011_cases\r\n\r\n";
              $replymessage .= "Wine Selection: $wine2\r\n";
              $replymessage .= "Bottles: $pino_gris_2011_bottles\r\n";
              $replymessage .= "Cases: $pino_gris_2011_cases\r\n\r\n";
              $replymessage .= "Wine Selection: $wine3\r\n";
              $replymessage .= "Bottles: $sauvigon_blanc_2011_bottles\r\n";
              $replymessage .= "Cases: $sauvigon_blanc_2011_cases\r\n\r\n";
              $replymessage .= "Wine Selection: $wine4\r\n";
              $replymessage .= "Bottles: $riesling_2012_bottles\r\n";
              $replymessage .= "Cases: $riesling_2012_cases\r\n\r\n";
              $replymessage .= "Wine Selection: $wine5\r\n";
              $replymessage .= "Bottles: $pinot_noir_2009_bottles\r\n";
              $replymessage .= "Cases: $pinot_noir_2009_cases\r\n\r\n";
              $replymessage .= "FREIGHT: $wine6\r\n";
              $replymessage .= "North Island: $freight_bottles\r\n";
              $replymessage .= "South Island: $freight_cases\r\n\r\n";
        $replymessage .= "Client pick up: $freight_free\r\n\r\n";
              $replymessage .= "Total $ $totalcost\r\n\r\n";
              $replymessage .= "From the folks at Hamden Estate\r\n";
              $replymessage .= "[email protected]\r\n";
              $replymessage .= "http://www.hamdenestate.co.nz\r\n\r\n";
              $replymessage .= "This e-mail is automated, so please DO NOT reply.\r\n";
    if (!preg_match(
    "/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i",
    $email_address))
        $errors .= "\n Error: Invalid email address";
    if( empty($errors))
              $to = $myemail;
              $email_subject = "Contact form submission: $name";
              $email_body = "You have received an online order via your website. Here are the details: ".
                                          " \n Name: $name
                                            \n Email: $email_address
                                            \n Phone: $phone
                                            \n Address: $address
                                            \n Address: $addresstwo
                                                                                                        \n Address: $addressthree
                                            \n Wine Selection: $wine1
                                            \n Bottles: $chardonnay_2011_bottles
                                            \n Cases: $chardonnay_2011_cases
                                            \n Wine Selection: $wine2
                                            \n Bottles: $pino_gris_2011_bottles
                                            \n Cases: $pino_gris_2011_cases
                                            \n Wine Selection: $wine3
                                            \n Bottles: $sauvigon_blanc_2011_bottles
                                            \n Cases: $sauvigon_blanc_2011_cases
                                            \n Wine Selection: $wine4
                                            \n Bottles: $riesling_2012_bottles
                                            \n Cases: $riesling_2012_cases
                                            \n Wine Selection: $wine5
                                            \n Bottles: $pinot_noir_2009_bottles
                                            \n Cases: $pinot_noir_2009_cases
                                            \n message \n $message       
                                                                                                        \n Freight: $wine6
                                                                                                        \n North Island: \n $freight_bottles
                                                                                                        \n South Island: \n $freight_cases
                                                                                                        \n Client pick up: \n $freight_free
                                                                                            \n Total $ : $totalcost";
    $headers = "From: $myemail\n";
              $headers .= "Reply-To: $email_address";
              mail($to,$email_subject,$email_body,$headers);
    mail($reply,$replysubject,$replymessage,$replyfrom);
              //redirect to the 'thank you' page          $reply = $_POST['email'];
              header('Location: contact-form-thank-you.html');
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
              <title>Contact form handler</title>
    </head>
    <body>
    <!-- This page is displayed only if there is some error -->
    <?php
    echo nl2br($errors);
    ?>
    </body>
    </html>

    bregent wrote:
    But wouldn't it be much more intuitive to use radio buttons here?
    Yes, but this a bit of a long running issue. The OP ideally wants to add the freight cost to the total price at the bottom of the form on the website before the information is sent back via php but that is done using javascript and radio buttons mess with the calculations. Inserting 1 into the freight form fields, which is counter-intuitive, does the trick but that will mess with the total price when php collects the information because the value is 1 rather than 10 or 15.

  • Info From Text Fields

    Hi, i was jsut wondeirng how to get the information submitted from a text field. Like, let's say i have a text field, and when the user types what they want in it, and hits the "Submit" button, it writes that information to a file. Thanks in advance
    PS: I know how to write info to a file, i just need to know how to get the information from the text field.

    Encephalopathic wrote:
    I recommend switching to Swing.Absolutely. Writing your app in AWT makes no sense these days. It doesn't really make your app look more "native" than Swing, due to its severe lack of features (accelerators for menus, toolbars, using the wrong fonts, etc.).
    If you really want to use a "native" toolkit instead of Swing, go with SWT, which has a much fuller feature set than AWT. Just be prepared to build different versions of your application for different platforms.

  • LOV from text field vs. button

    I have an LOV that works upon navigation to a text field. It works great. I now want to base it off a button instead. Can I do this, but keep it based on the data from the text field even though it is the button launching it?
    Also, can I elimate or disable the Find button in the lOV? How do I do this?

    I got it working now.
    used the following code:
    LOV lov = new LOV();
    void jButton1_actionPerformed(ActionEvent e) {
    lov.setDataItemName("infobus:/oracle/jstut/lOVRowSetlkupquad");
    lov.setRestrictedQuery("infobus:/oracle/jstut/rowSetlkupquad/QuadLong", null);
    lov.setTitle("Title of window");
    lov.setSize(550, 300);
    lov.show();
    ** note that lOVRowSetlkupquad is the lovrowset and not the lov.
    ** and note "rowSetlkupquad/QuadLong"
    is the object in the rowset it is based on.
    Still does anyone know how to eliminate the find button in the LOV box?
    null

  • How to return text from Text Field?

    I'm an experienced VB programmer, but new to Dreamweaver, and
    web programming. I need to put the text just entered by the user in
    a form text field into a field farther down in the form- like when
    your mailing address automatically populates into a shipping
    address field. How to do?
    Thanks
    Bill Spencer

    HI,
    If i understand for you purpose you need to use a select list with redirect.
    Then you have to put in the text field the code for displaying the corrisponding cities related to the code you choosed from the select list.
    However that depends a lot about data and your app itself: If i understand you assume the postalcode is unique for a given city?
    hope it helps
    Message was edited by:
    Marcello Nocito
    Message was edited by:
    Marcello Nocito

  • File name from text field value

    Is it possible to save a file with the value of a Text field?
    Thank you

    Well JSP is server side code and TextBoxes are html which is client side script. To get the value of an html Textbox you either can use Javascript and do it all client side or you can post your form to a JSP or servlet and use request.getParameter("field_name"); to get the value of the form field.
    make sense?
    -S-

  • How to remove labels from text fields?

    Hey Everyone!
    I am having troubles with forms in Dreamweaver CC.
    I insert a text field in a form but the text field automatically comes with a label.
    How do i stop this?

    And I get that!
    But say I insert a text field.
    It is preceded by a label saying "Text Field 1:"
    But I already have written what the text field is supposed to do!
    And when I go in front of the label and press backspace, it doesn't wanna get deleted; not until I have to select the text and delete it!
    So you see a large part of my time is getting wasted in formatting the page and i can't give my full attention to the php code I want to write as I get frustrated because of this!
    So if you could help me get rid of the labels for good ; it'll be amazing!
    Thanks
    Regards
    Anuj

  • Convert Text from Text Field

    For compatability purposes with other forms, I have a text field that numeric data is entered into.  I would however like to perform a calculation off of this field, so would therefore like to convert the number entered into this field into a numeric value rather than a text value.  Can anyone explain to me how this is done?
    Thank you in advance!

    Depending on the type of number you want you would use parseInt or parseFloat in Javascript. So when addressing your field in the calculation (assuming it is called TextField1)
    var myResult = parseFloat(TextField1.rawValue) + 123.45
    Make sense?
    Paul

  • Taking info from text fields

    I am trying to sut this game up so that if the text "NateTheWizard" are typed in a text field, then the 'new game' button will load level 3 instead of level one.
    with this text, no matter what is in the field, it loads level one:
    public void startButton_actionPerformed(ActionEvent e) {
    if((password.getText() == "NateTheWizard")){
    DotStealthFrame.contentPane.removeAll();
    DotStealthFrame.contentPane.add(new Level3(), BorderLayout.CENTER);
    DotStealthFrame.contentPane.updateUI();
    DotStealthFrame.contentPane.getComponent(0).requestFocusInWindow();
    lvl3Popup level3Pop = new lvl3Popup();
    level3Pop.setModal(false);
    level3Pop.setLocation(300, 300);
    level3Pop.setVisible(true);
    else{
    DotStealthFrame.contentPane.removeAll();
    DotStealthFrame.contentPane.add(new Level1(), BorderLayout.CENTER);
    DotStealthFrame.contentPane.updateUI();
    DotStealthFrame.contentPane.getComponent(0).requestFocusInWindow();
    lvl1Popup level1Pop = new lvl1Popup();
    level1Pop.setModal(false);
    level1Pop.setLocation(300, 300);
    level1Pop.setVisible(true);
    }

    http://access1.sun.com/FAQSets/newtojavatechfaq.html#9

  • How to strip text formatting from text field value ??

    Hi everyone,
    Have tried to get some info on this but no luck.... I've
    created a simple contact form in Flash, but the URL which it's
    generating contains the text formatting from the text input fields.
    As a result the script that processes the mail send doesn't work.
    How do I strip the text formatting out of text1, text2 and text3
    before I use getURL() ??
    on (release) {
    url_var =
    "your_name="+text1+"&your_e-mail="+text2+"&message="+text3;
    getURL("contact.php?"+url_var, "_blank", "GET");
    text1 = "";
    text2 = "";
    text3 = "";
    }

    text1.text = "";
    text2.text = "";
    text3.text = "";
    …that should strip the textfields. You probably also
    want to add this property (text) in the getURL()

Maybe you are looking for