Trim  "-gp" off end of text?

How does one remove or trim letters off the end of a database
item if it
exists?
A typical product id may be: sr-4433-gp or something like
that.
Some of the products have the -gp and others don't. I want to
trim the -gp
off all products. How do I do this?

google
Database type Trim
like
MySQL trim
Can also search the archives, but google usually takes less
time with such
non-DW specific questions.
If you haven't already, you would be well served searching
through the
archives for the answer to your question. The archives can be
found here:
http://groups.google.com/group/macromedia.dreamweaver
http://groups.google.com/group/macromedia.dreamweaver.appdev
HTH,
JOn
"lee" <[email protected]> wrote in message
news:eb7k3e$seq$[email protected]..
> How does one remove or trim letters off the end of a
database item if it
> exists?
>
> A typical product id may be: sr-4433-gp or something
like that.
>
> Some of the products have the -gp and others don't. I
want to trim the -gp
> off all products. How do I do this?
>

Similar Messages

  • Trim title off of string using the replace command

    Below is a simple task to read in data from a text file to use in account creation.
    Get-Content employee.txt |
    ForEach{
        $ID = ($_ -split ';')[0]
        $fname = ($_ -split ';')[1]
        $lname = ($_ -split ';')[2]
    A problem that has came up which I did not anticipate was titles.  Titles such as MBA etc. throw off the creation of the account. I have a title like this myself an understand why someone is proud to append it to the last of their name because
    they worked very hard to get it.  In this case I need to trim it off to create the account. Below is an example of a data file
    1234;test;user, MBA;
    4567;test;user2 MBA;
    8901;test;user3;
    Thought this would be an easy fix and here is how I attempted to correct it below
    $lname = $string
    $string -replace ",*" -replace " "
    $string
    My thought was a comma or a space could be used to divide the last name the same as I divided the individual fields in the text file with a semicolon. Is there an easy method to do this? The replace seems easy enough but the problem is I'm not familiar with
    the syntax in powershell.

    RegEx is an excellent tool but itt tkes a programmers mind to understand its subtleties.  It is a good excercize in declaritive thinking and in recursive parsing systems.  Once understood the lesson is transferrrable.
    I do not recomment it to new scripters.  After you gains some mastery of a scripting system then RegEx becomes nmuch easier to understand.  I am not a RegEx wizard although I have used it since before it had a name.  It was part of all editors
    before we had PCs.  VI and HPs EDIT,  MsEDIT and others.  EDLIN uses a primitive form of RegEx from the minicomputer era.  Of course EDLIN is no more.
    ¯\_(ツ)_/¯
    I wouldn't necessarily call myself a new scripter, been doing it a few months now and whilst there is definitely a lot more i could learn, i find that when i need to accomplish something i figure it out eventually, it's how i learn best! It does leave me short
    of tips and tricks you'd find in the early chapters of a book though!

  • How do I end opening text on iMovie at certain time?

    How do I end opening text when I want it to end?

    Indeed, you can set the strings for the on and off state, but it will
    only show the default off state text when running on a pocketPC. A
    solution is to use two buttons: one to turn on and another to turn off.
    By overlaying the two controls and hiding the last pushed button, you
    can actually simulate a single button. See attachment (LV7.1).
    Attachments:
    simple boolean.vi ‏45 KB

  • How to get the focus at the end of text ?

    I am having applet with awt TextField component and some default text. (MSQ-)
    To have a focus to text field I am using :
    refnoTextField.requestFocus();
    But this gives focus at the biginning and not at the end of text. I want the focus at the end (i.e. after MSQ-)
    How to get the focus at the end of text ?
    any help ?
    manisha
    manisha

    public void focusGained(FocusEvent e) {
         if (e.getSource() == yourtextbox) {
         yourtextbox.setSelectedEnd(yourtextbox.getLength());
    try this thing - not sure if it'll work, but I figgured out how to apply it to my textareas for keeping the focus on the last line of the textarea..it might work for your textboxes..
    shrug

  • Is Verizon trimming $10 off most data plans -- or not?

    Read today 2/4 that Verizon is trimming $10 off most data plans--but no sign of it on My Verizon.

    The changes aren't effective until tomorrow (Feb. 5):
    Some Changes coming to More Everthing.!

  • HT204389 How do u turn off Siri from text message

    How do u turn off Siri on text message

    you can only completely disable Siri.  You can not selectively delete it for certain things.

  • Dynamic Tab Shell Cutting Off Images and Text

    I'm using the Dynamic Tab Shell on a page and trying to get a few image links and output text displaying properly in the Global Toolbar.  I want the image links on the left side of the toolbar and the output text on the right side.  The problem is the images are being cut off and the text is wrapping into a small space and is not fully readable.  The images are 32x32 pixels.  Should I resize them to something smaller?  I tried using smaller images previously, but it seems to just push them down and still cut them off.
    The full output text should be "Logged in as: username", but it's forcing it into a small space and cutting off the username like this:
    Logged
    in as:
    username (this line is not visible in the toolbar)
    Here is my code.  Any help is appreciated.
                <af:pageTemplate viewId="/oracle/ui/pattern/dynamicShell/dynamicTabShell.jspx" value="#{bindings.ptb1}"
                                 id="pt1">
                        <f:facet name="globalToolbar">
                           <af:panelGroupLayout id="pgl5" layout="horizontal" valign="top">
                             <af:toolbar flex="1" stretchId="stretch1" id="tb1">
                               <af:group id="grp1">
                                  <af:commandImageLink text="" actionListener="#{tabmanagement.dashboardSelected}" id="cil1" icon="/images/AsIconDashboard.png" partialSubmit="true"/>
                                  <af:commandImageLink text="" actionListener="#{tabmanagement.toggleSelected}" id="cil2" icon="/images/AsIconToggle.png" partialSubmit="true"/>
                                </af:group>
                                <af:spacer id="stretch1" width="10" height="35" clientComponent="true"/>
                                <af:outputText id="loggedInAsOT" value="#{tabmanagement.loggedInAsText}"/>
                             </af:toolbar>
                          </af:panelGroupLayout>
                        </f:facet>

    Moving the output text from the globalToolbar facet into the globalSearch facet fixed the problems and gave me the intended results:
                   <f:facet name="globalToolbar">
                      <af:panelGroupLayout id="pgl5" layout="horizontal" valign="top">
                         <af:toolbar id="tb1">
                            <af:group id="grp1">
                               <af:commandImageLink text="" actionListener="#{tabmanagement.dashboardSelected}" id="cil1"
                                                    icon="/images/AsIconDashboard.png" partialSubmit="true"/>
                               <af:commandImageLink text="" actionListener="#{tabmanagement.toggleSelected}" id="cil2"
                                                    icon="/images/AsIconToggle.png" partialSubmit="true"/>
                            </af:group>
                         </af:toolbar>
                      </af:panelGroupLayout>
                   </f:facet>
                   <f:facet name="globalSearch">
                      <af:outputText id="loggedInAsOT" value="#{tabmanagement.loggedInAsText}"/>
                   </f:facet>

  • Turn off iTunes predictive text

    Hi is it possible to turn off the  predictive text when trying to edit track info ?
    This is so annoying when trying to edit track info I start typing and itunes tries to guess the name, grrr ;(
    thanks

    theigloo2 wrote:
    Hi is it possible to turn off the  predictive text when trying to edit track info ?
    AFAIK you can't.
    personally, i work around the issue by typing an "X" when starting to enter text (for instance "XBruce Springsteen"), which is removed once the edit is done.

  • Captivate cuts off the end of text to speech audio sequences

    Hi there,
    I have a problem Captivates TTS audio. When I use the F3 key to check the audio sequence, everything sounds normal.
    However, after publishing the entire course as an .exe file some audio sequences are cut off at the end, e.g. using the following text “ear-phones are needed”, in the published version Paul only says “Ear-phones are NEED”.
    First, I thought that the end of the audio was too close to the end of the slide. Therefore, I made sure that every slides duration was longer than the audio. But it didn’t make a difference.
    Has anyone experienced this before and knows how to help?
    Your help is appreciated!
    I use Captivate 5, but also had this problem in version 4...

    Hello There,
    Can you try the steps mentioned in http://blogs.adobe.com/captivate/2009/04/vtml_tags_in_text_to_speech_1.html? Adding this VTML tag should be resolving the issue. Please let me know.
    Thanks,
    Vish

  • How can I trim time off the beginnings and ends of songs in iTunes?

    I have some old recordings that I was able to put into iTunes, but some of them have dead air at the beginning and the end. Is there a way to trim that time off? Thanks

    Well, I easily made the track with which I had this problem into an AIFF file by going to control click and "Create AIFF version." It changed the play time just as I wanted, but I can't seem to convert it back to MP3! The manual says to change Import Settings--I did--but now even when I change from AIFF to MP3 the next time I open the settings it still says AIFF! Help! I want my settings for MP3! Also, there doesn't seem an easy control click way to change the AIFF file to MP3 as there was to change the MP3 file to AIFF--so now I have two of them--an MP3 file the wrong length, and and AIFF file the right length--when what I want is an MP3 file the right length!

  • Can't trim beginning off audio track???

    I am new to Aperture (3.0.2), so this is probably a simple question, but the problem is driving me crazy. Thanks in advance for any help!
    I have a slideshow, and want to add audio. I can drag in a song (into the secondary audio track) from the audio browser, and it works fine. However, I want to trim off the first part ("boring intro") of the song. When I drag the slider at the start, it appears to work normally (like iMovie, for example), and I see the length of the song decreasing. However, when checking it is really trimming off the end of the song -- not the beginning! Is it possible to trim the beginning of the song off?

    @Jeff: I have not tried this on the latest update to Aperture, but I had the exact same problems when trying out the Aperture 3 slideshows in an earlier version. It seems like a huge oversight to not include the ability to trim the beginning of a song but to include the ability to trim the end. Many songs start slowly and would often need to be trimmed.
    I suggest that you submit feedback to Apple (select the "Aperture" menu item and then "Send Aperture Feedback...") on this issue, and I'll check my system tonight and submit feedback as well if I find that the issue hasn't been fixed in 3.0.2.

  • GUI_DOWNLOAD TXT file,a "?"at the end of text.

    HI experts:
        I use 'GUI_DOWNLOAD' to download a text file, the text are Chinese worlds,one word is "燊",in the end of the text file,there is "?" .like "宜州燊龙贸易有限责任公?"
        when I delete the world  "燊" ,it become right.why?
        thanks a lot.
    the code is:
    REPORT  z1807test001.
    DATA : BEGIN OF out OCCURS 0 ,
    text1(100) TYPE c,
    text2(100) TYPE c.
    DATA : END OF out .
    out-text1 = '宜州燊龙贸易有限责任公司'.
    APPEND out.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
      BIN_FILESIZE                    =
         filename                        = 'D:\222.TXT'
        filetype                        = 'ASC'
      APPEND                          = ' '
       write_field_separator           = 'X'
      HEADER                          = '00'
       trunc_trailing_blanks           = 'X'
       write_lf                        = ''
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
       codepage                        = '8400'
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
       TABLES
         data_tab                        = out .
      FIELDNAMES                      =
    Edited by: huiqing wei on Jan 26, 2010 5:17 AM

    Hi,
    It is not a ABAP issue.
    1) Check the code page you are using?
    2) check by creating text element and translate in SE63 to confirm.
    3) May be basis guy can check regional settings.
    Manas M.

  • PSE 7: How do I turn off the automatic text insertion on photos in slide show

    When I create a slide show, PSE 7 creates text on each slide that states my cameras name: "SAMSUNG DIGITAL CAMERA" How do I turn-off this feature?  

    In the settings dialogue when you start the slideshow, uncheck the "Include Captions" box.

  • How do i turn off sound and text notifications?

    I find both the text and sound notifications very annoying. I do not play games or do anything other than work on this computer. When I unchecked the "show a notification" and "play a sound" boxes, the notifications and sounds do not turn off. I also prepared a 5 second sound file of silence and checked the "Play a Sound" and "use the following sound" boxes with the name of the silence in the required field. Nothing has worked. I don't like being disturbed when I work. I have done the checking and unchecking before restarting and also starting the computer up after a complete shut down.

    If you unchecked the option in Thunderbird then I doubt that is where the notification is coming from. MACs are notorious for supplying an additional notification. I would check your operating system for the source of the notification.

  • How do I turn off the auto text "I can't talk right now...I'll call you later" when I cancel an incoming call?

    When someone rings me and I don't want to talk to them I cancel the call. With the new iOS 6 update my phone now automatically sends the caller a text that says "Can't talk right now...I'll call you later."
    How do I turn this feature off?? I don't want it!!
    Please help I've looked everywhere in my settings.

    Could you be a bit more specific?? Which settings?? "about 7 items down" doesn't really tell me much. What is the path?? I.e  settings>messages>etc,etc. as I said above I have checked all the settings.

Maybe you are looking for

  • How to scale a JPanel?

    I have written an application which places JPanels on the screen inside another JPanel. I would like to scale what appears on the screen and have done this by changing the x, y, width and height values. However due to rounding if I scale up and down

  • Problem with multiple calls to hr_infotype_operation in a loop

    Hi, Im using infotyp 2003 with the following situation. For a date, e.g. 2011/07/20 and a person_nr I have several time entries, like 08:00-09:00, 10:00-12:00, 15:00-17:00. Now I read the entries with  HR_READ_INFOTYPE and store them back unmodified

  • Problem while creating queries using SQVI

    Guys, I have many diff versions of sap's. 4.6c, 4.7, 4.7uc, 5.0, 5.0uc and so on...... I have to few queries in 4.7 in SQVI, i have to make it in sync in all the othr servers. I have created all of them in all servers, but while creating in 4.6c, whe

  • The Legend of Korra not in real HD, please fix it.

    Hello, iTunes customer service: I've bought the complete season of "The Legend of Korra". It's a great series, but your video encodes are messed up. You encode the video at 960x718 aspect ratio, which is definitely not real 720p HD. Also you set the

  • Since I update to the latest version of flashplayer my pdf file will not open. It keep tell me to update. How to resolve this problem?

    It is important that I am able to open my PBF FILE.  Error message up date to the latest version of flash player. I updated to the latest version and I am still, unable to open my pbf file. Any suggestion? I need to download a test.