Replace all occurrence with range - issue

Hi,
I have a range with "letters" like ":" or "-" or "."
Note: all entries are with option = "equal"
Now i need to "replace all occurrences" of "all entries in that range" with space.
idea:
loop at range assigning <range>.
replace all occurrences of <range>-low in aaa with space
endloop.
Any better ideas ?
Regards,
Gordon

Sorry but i think my question was not clear.
is there another way instead of using the "loop" ?
The translate or replace statement is not the problem
thx,
Gordon

Similar Messages

  • Replacing all occurrences of characters in a string with one new character?

    Hi there,
    I'm looking for a way that I could replace all occurrences of a set of specific characters with just one new character for each occurrence.
    For example if I have a string which is "word1...word2.......word3....word4............word5" how would I be able to replace this with just one character such as ":" for each set of "." so that it would essentially appear like this "word1:word2:word3:word4:word5"
    If I just use replace(".", ":") I am left with "word1:::word2:::::::word4::::word5::::::::::::"
    So therefore I'm guessing this would require the use of replaceAll() maybe? but I'm not really very familiar with how regular expressions work and how this would be accomplished using them.
    Any help would be greatly appreciated :) Thanks.

    Yes, but "." means any character, so ".\+" means "any character repeated more than once". If you just mean a full stop ("period" for you Americans :p) you should use "\.+" as your regular expression, but remember that for Java you need a '\' escape to recognise '\' as '\', so in code you'd actually type your regex as:
    "\\.+"Here's an example of one way to do it:
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class Test {
        public static void main(String[] args) {
           String string = "example1.......example2...example3.....example4";
         Pattern pattern = Pattern.compile("\\.+");
         Matcher stringMatcher = pattern.matcher(string);
         string = stringMatcher.replaceAll(":");
         System.out.println(string);
    }Edited by: JohnGraham on Oct 24, 2008 5:19 AM
    Edited by: JohnGraham on Oct 24, 2008 5:22 AM

  • DUMP: replace all occurrences of space in string1 with string2.

    Why does this statement results in a dump:
    replace all occurrences of space in string1 with string2.
    same with
    replace all occurrences of ' ' in string1 with string2.
    string2 is a string without spaces!
    Is there any drawback on using this statements as a workaround?
    while sy-subrc eq 0.
      replace space with string2 into string1.
    endwhile.
    Thanks
    norbert

    Hi,
    See this example i got from ABAPDOCU
    replacing values
    DATA: t4(10) TYPE c VALUE 'abcdefghij',
          string4 LIKE t4,
          str41(4) TYPE c VALUE 'cdef',
          str42(4) TYPE c VALUE 'klmn',
          str43(2) TYPE c VALUE 'kl',
          str44(6) TYPE c VALUE 'klmnop',
          len4 TYPE i VALUE 2.
    string4 = t4.
    WRITE string4.
    REPLACE str41 WITH str42 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str42 INTO string4 LENGTH len4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str43 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str44 INTO string4.
    WRITE / string4.
    SKIP.
    ULINE.
    Example for condensing strings
    DATA: string9(25) TYPE c VALUE ' one  two   three    four',
          len9 TYPE i.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9 NO-GAPS.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    SKIP.
    ULINE.
    Thanks & Regards,
    Judith.

  • Replace all occurrences of ENTER in a string

    Hi,
    I have a string which contains line breaks:
    '<HTML><HEAD>
    </HEAD>
    <BODY>'
    and it is shown to me in the debugger as:
    '<HTML><HEAD>#</HEAD>#<BODY>'
    Now I want to replace all line breaks in the string,
    but
    replace all occurrences of `#` in text with ' '.
    doesn't work.
    So if you have an idea how to replace the # symbol for Enter in a string please tell me ;).
    regards,
    Stefan

    Hi,
    Pls use
    replace all occurences of '#' in text with cl_abap_char_utilities=>newline.
    Eddy

  • IPhoto frustrating error..The volume for "Df23.JPG" cannot be found. It prompts for all photos with this issue rather than offering an option to ignore. I can find the images in spotlight but not in Find Photo. Does anyone have a solution

    iPhoto frustrating error..The volume for "Df23.JPG" cannot be found. It prompts for all photos with this issue rather than offering an option to ignore. I can find the images in spotlight but not in Find Photo. Does anyone have a solution?

    Unless you have the source files that were on the TC or Windows machine you will have to start over with a new library as follows:
    Start over from scratch with new library
    Start over with a new library and import the Originals (iPhoto 09 and earlier) or the Masters (iPhoto 11) folder from your original library as follows:
    1.  Move the existing library folder to the desktop.
    2. Open the library package like this.
    Click to view full size
    3. Launch iPhoto and, when asked, select the option to create a new library.
    4. Drag the Masters (iPhoto 11) folder from the iPhoto Library on the desktop into the open iPhoto window.
    Click to view full size
    This will create a new library with the same Events as the original library but will not keep the metadata, albums, books slideshows and other projects.  Your original library will remain intact for further attempts at fixes is so desired.
    OT

  • On 3rd replacement! help with ongoing issues

    I am desperate! I got my first 3gs in May and by July I took it to a Genius Bar becuase of battery issues. They replaced it immediately.
    That phone worked fine at first then it started to freeze. It would turn off randomly and I wouldn't be able to get it back on no matter what way I tried to plug it in (into my imac, into the wall, into speakers - nothing worked). It would finally turn on a few hours later. The phone also started to make a bizarre noise after haning up a call. A few seconds after hang up a loud fuzzy quick noise would come out of the speakers. I took it in to the Genius Bar, we reset everything as new, and after about a week, I took it back again with the same issues and the phone was replaced the second time.
    The second phone, after about a month, had the same issues with freezing and the noise from the speaker. We reset it as new and after a few appointments, it was replaced and I got my 3rd phone.
    My 3rd phone is having the exact same issues so i took the phone and our computer into the Apple Store. They checked out the computer - everything was fine - looked at my itunes and didn't see any issues and we reset the phone again. A week later, my issues are back and worse. My phone will not play on any speakers at all (it acknowledges it's plugged in and charges and won't play. My husband's iphone will play on the speakers), and when I put headphones in it's extremely fuzzy (have tried 3 sets of headphones). The phone freezes and is making the same noise after a call ends.
    Any ideas of what else to look for or do would be SO helpful. I do not want another replacement phone. Could there be a virus? Could it be an app (I only have a few apps - NPR, ATT, that's it).
    My husband has a different login on our computer and has the same phone and hasn't had any issues.
    Thank you!

    No your iPhone can't have viruses. Take it back to apple, I went through 4 iPhone 3G's till I got a good one, it happens with technology sometimes, you get duds. You need to go back to apple.

  • It all started with Itune issues...

    First Itune kept shutting down when opening. Then I began having issues opening certain files. Now iphoto is having trouble. When I try to access material from my computer to put on the web it only allows for me to use the keyboard arrows and won't allow for me to actually post material.

    My itunes crashes when I try to sync my iphone or ipad.  Tried lots of restarts, safe mode, deauthorizing and reauthorizing, deleting backups.  Time Machine reverts to current itunes.  It's off to the genius bar tomrrow with all my stuff.  Imac running Lion, Ipad 1, iphone 4, all updated on software. 

  • Replace all footage with different format

    Hi All,
    So I am aware about like changing some files by like renamming or moving the folder and opening the project and then pointing it to the new directory/whatever and that works great.
    I am helping out a friend who does sound who's client is a mess and I need to figure out a fast way to fix this.
    Long story short the poor kid shot on a redcam but had everything converted to .mov 720x480 files and edited in premiere elements. Well... The sound guy can't get an OMF from there so I took everything and imported it into premiere pro and started fixing a couple bits up and exported the OMF. Now I found out that the kid still has the R3D files. so I would like to replace every .mov and .mp4 file in this project to the r3d of the same name with just the r3d extension.
    Meaning when I tried to move the other files and start replacing i had to manually locate each r3d and that would take forever...
    I want to change the files to the much better quality ones, setup a proper sequence, keep his edits, and then speedgrade it for him but I am not willing to invest the time of manually replacing each file.
    any ideaS?

    Hi Jim,
    I moved all the R3Ds (that's all he has, not other files associated to it) into the same folder so they are together, and that did not work
    I feel bad for this kid as he has invested and is trying to do something, but doesn't know how. I may end up doing it the long way.

  • Identifying patterns in a string & replacing all characters with 1st digit

    Morning folks. Interesting problem on hand. I have a situation where I have a varchar2 text field where I have different paterns of a sequence of numbers somewhere in the string. I guess, I could write a function where by I accept the whole string and then identify one of the patters below and then finally replace only the recognized pattern with the first digit all the way through to the end of that pattern.
    The catch here is that there could be free text before and after the string but there will be spaces when free text ends and the patern begins.
    Here are a few patterns I would be interested in. The MAX length is 19 as in Cases 1 and 3.
    1. 9999 9999 9999 9999
    2. 9999999999999999
    3. 9999-9999-9999-9999
    4. 9999-9999-99-99999
    5. 9999-999999-99999So, here would be an example of the problem in hand :
    Call received on 9/22/2009.
    5123-4532-8871-9876
    Please follow up by 10/22/2009So, the desired output would be :
    Call received on 9/22/2009.
    5555-5555-5555-5555
    Please follow up by 10/22/2009Any ideas ? I am stumped at the fact of before and after text in the string, hence the question for you guys !
    Thanks !

    Here is another solution. However there has to be a better way! (I'm not a regular expression expert).
    SQL> WITH test_data AS
      2  (
      3          SELECT 'Call received on 9/22/2009.
      4          1232 3456 8765 3456
      5          Please follow up by 10/22/2009' AS DATA FROM DUAL UNION ALL
      6          SELECT 'Call received on 9/22/2009.
      7          1232345687653456
      8          Please follow up by 10/22/2009' AS DATA FROM DUAL UNION ALL
      9          SELECT 'Call received on 9/22/2009.
    10          1232-3456-8765-3456
    11          Please follow up by 10/22/2009' AS DATA FROM DUAL UNION ALL
    12          SELECT 'Call received on 9/22/2009.
    13          1232-3456-86-3456
    14          Please follow up by 10/22/2009' AS DATA FROM DUAL UNION ALL
    15          SELECT 'Call received on 9/22/2009.
    16          1232-345687-3456
    17          Please follow up by 10/22/2009' AS DATA FROM DUAL
    18  ), substring AS
    19  (
    20          SELECT  DATA AS SOURCE
    21          ,       REGEXP_INSTR
    22                  (
    23                          DATA
    24                  ,       '(([[:digit:]])+[[:space:]|-]){1,}'
    25                  ) AS PATSTART
    26          ,       REGEXP_SUBSTR
    27                  (
    28                          DATA
    29                  ,       '(([[:digit:]])+[[:space:]|-]){1,}'
    30                  ) AS PATTERN
    31          ,       19 AS MAXLENGTH
    32          FROM    test_data
    33  )
    34  SELECT  SUBSTR
    35          (
    36                  SOURCE
    37          ,       1
    38          ,       PATSTART-1
    39          ) ||
    40          TRANSLATE
    41          (
    42                  PATTERN
    43          ,       '0123456789'
    44          ,       LPAD
    45                  (
    46                          SUBSTR
    47                          (
    48                                  PATTERN
    49                          ,       1
    50                          ,       1
    51                          )
    52                  ,       10
    53                  ,       SUBSTR
    54                          (
    55                                  PATTERN
    56                          ,       1
    57                          ,       1
    58                          )
    59                  )
    60          ) ||
    61          SUBSTR
    62          (
    63                  SOURCE
    64          ,       PATSTART + MAXLENGTH
    65          )       AS NEW_STRING
    66  FROM substring
    67  /
    NEW_STRING
    Call received on 9/22/2009.
            1111 1111 1111 1111
            Please follow up by 10/22/2009
    Call received on 9/22/2009.
            1111111111111111
          Please follow up by 10/22/2009
    Call received on 9/22/2009.
            1111-1111-1111-1111
            Please follow up by 10/22/2009
    Call received on 9/22/2009.
            1111-1111-11-1111
           Please follow up by 10/22/2009
    Call received on 9/22/2009.
            1111-111111-1111
          Please follow up by 10/22/2009
    SQL>

  • Replacing site made with DW8 issues.

    Hi, I'm considering using Muse. I'm not too code savvy but have an existing site I made with Dreamweaver 8 a few years ago. This site sits on page 1 in Google. The whole site needs replacing design wise and I know Photoshop well. My concern is that using Muse, I may lose my ranking when I upload a Muse designed site.

    I dont think so, you got to that top on google because of the frequency and quality of your contents, not because it was Dreamweaver. Muse is SEO friendly and you will be amazed at the speed at which your site will continue to maintain and rise towards No. 1. Just ensure you setup your p tags, alt tags, h1 tags, metadata, etc all which Muse has +sitemap. Please go ahead, Muse is the best design tool for the web right now. I know so because I have  used all amost all the web design tool the web has to offer but none come close to what Muse does. I have used (wyiswyg web builder, Flux, xara, freeway, rapidweaver, etc). I have also used Dreamweaver (Which am still using to cover the missing features in Muse temporarily esp. form components), Defunct Golive cs2 (Love this app then). But Muse would surpass it. The team on Muse are dedicated and listen to their users.
    Muse gives you the freedom to create the web (Its a freeform webdesign app for today and the future) , others enable you to assign elements on a web page. Enjoy.

  • Replace all occurences in 4.6c

    Hi,
    I have a program which analyse system and gives some output.(Regarding programs,FM's etc).
    I need to run this my present server which is of 4.6c.
    But this program developed in ECC 6.0 and when i loaded this notepad program it was giving some errors.
    One error is REPLACE all occurrences of '('  in i_userexit-txt WITH space.
    In 4.6 c it is not accepting ALL OCCURENCES.
    It is accepting only Replace first occurence.
    What i need to do to replace all occurences in 4.6C?
    I there any statement to replace all Occurences?
    I searched in ABAP help  for 4.6c also.
    Please help to correct this.
    Regards,
    Krishna.

    you can do something like this, this wil do REPLACE ALL OCC...:
    WHILE sy-subrc EQ 0.
    REPLACE ... " acc. to 4.6 Syntax ...
    ENDWHILE.

  • Substitutions Replace All

    Since I like to output manuscrupts to ePUB for reading in iBooks, I prefer to have typographical quotation marks—smart quotes—on. Pages 5's parity with Pages for iOS made it more difficult to globally search-and-replace ordinary quotes (inch marks) with smart quotes from the Find & Replace dialog. (The crippling of the Find & Replace even more is a subject for another rant ) But it seemed Pages 5 has the answer in its Show Substitutions submenu.
    In the help, it says:
    Choose Edit > Substitutions > Show Substitutions (the Edit menu is at the top of your computer screen).
    In the Substitutions window, select the Smart Quotes checkbox.
    Choose a quotation mark style from each of the pop-up menus.
    Click a button to replace all occurrences of quotation marks in the document, or just in the selected text.
    Which I thought means if I have straight quotes and double-dashes, hitting "replace all" or "replace in selection" will convert them to curly quotes and em dashes.
    But it doesn't.
    So far as I can tell, nothing happens.
    Knowing that a lot of this is actually shunted into OS X's Text preferences, I tried making sure the Text preferences were set properly, quit all apps, restarted, opened Pages, opened a new document, typed in a test sentence with straight quotes and double-dashes, and then did the above Help procedure.
    Nope. Still nothing happens.
    I hope this is a bug and not another "refinement". I reported it as a bug.
    This wouldn't matter on documents edited on the Mac, since typing smart quotes and em dashes still work. Moving around from Pages on iOS, however—where getting to the correct quotes is a bit of a chore—I liked being able to do a global "smartify my quotes" on Pages on Mac. But like I said, can't seem to do that anymore—and the Help seems to say that I should, using the Substitutions dialog.
    Have you gotten this to work? Have I misinterpreted what the Substitutions submenu and dialog is supposed to do?

    A workaround, of sorts. After pasting large amounts of text (full of straight quote marks and straight apostrophes) into Pages documents I, too, have tried and tried to convert to smart quotes, only to be frustrated. (I also spent quite a bit of time on the phone in November 2014 with a Pages tech support person, and he could not provide an answer. He promised to pass this on to the Pages team. This is where you start holding your breath...) Here is my workaround until (if) Apple fixes this. You are going to groan when I say this, but if you have Word on your Mac simply copy and paste the text into Word. (Perhaps you may find another word processor that does the same thing.) There the conversion is quick and simple. Then paste it back into Pages. I happen to have an older copy of Word because I was forced to start using Pages when the version of Word would not utilize the Retina display on my new Power Book an everything was fuzzy.

  • REPLACE ALL OCCURRENCIES

    Hello
    Can somebody explain me the logic of ALL OCCURRENCIES in the the example below :
    I think that this operator should replace A , ! with ' ' but the real output is different.
    The real output is AA!A. It replaces all small characters with ' '. Why
    DATA : l_PD(10) TYPE C.
    l_pd = 'AbbA!A'.
    replace all OCCURRENCES OF REGEX
      '[^!"%&''()*+,-./:;<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]' in
      l_pd with ' '.

    ... and put search (patterns) characters in square brackets [[ and ]].
    See also [Regular Expressions in Routines|http://help.sap.com/saphelp_nw70/helpdata/en/42/9d6ceabb211d73e10000000a1553f6/frameset.htm]
    Regards,
    Clemens

  • About REPLACE ALL functionality

    Dear All,
    I have one string which contains '#' in between. And I want to replace all these '#' with ' ' (ie blank SPACE)..
    For this I am using:-
    REPLACE ALL OCCURRENCES OF '#' IN L_TEXT WITH ' '.
    But to my greatest surprise, its not able to replace it saying sy-subrc = 4 ie its not able to locate '#'.
    I have observed following:-
    1. Suppose L_TEXT = 'corrective action## is that# to be #taken'
    then replace all fails.
    2. But suppose L_TEXT = 'corrective action # # is that # to be # taken'
    then its works.
    I tried the option of
    REPLACE ALL OCCURRENCES OF REGEX '#*' IN L_TEXT WITH ' '.
    But its putting ''#" after every character !!!
    And the same functionality works with CRM4.0's ABAP editor but now when i am using it in CRM2007's ABAP editor, its not woking.
    I have tried it in ABAP editors of other systems like PRD n all. Its working there too.
    Can anybody please shed some light on this?
    regards,
    Amey Mogare

    Yes Matt,
    I suspect its not the actual character "#". !!!!
    Actually in one of the CRM transaction GUI, there is a Text Box where user can enter his Survey details. In this, if he enters a newline then in FM i'm getting it as "#"... What I mean is if I write :-
    Heading 2: h2.
    Containment text
    is as follows
    line 1
    line2
    Heading 2: h2.
    Then in FM's field its represented as
    Heading 2: h2.
    Containment text# is as follows# line 1# line2
    Heading 2: h2.
    But this is getting messed up in when we dump it into excel sheet.
    So how do i replace these with Spaces?
    sample code line would be very helpful.
    Thanks a lot for pointing this out.
    regards,
    Amey

  • A suggestion for those with battery issues:

    When I first got my iPhone, I had the same battery issues many people here are talking about, in fact I posted about it myself. Its fixed. Very fixed, and Im very happy with my battery life. Here is what I did.
    First, do not charge it using your USB connection. At least not always. Why? I dont know. I did the first few days, and couldnt get a full charge even tho system wasnt going to sleep. I started using the wall charger, and got longer battery life, but still not great. One night, I forwarded the phone to my home phone in case I got a call, and shut the phone down completely, and put it on charge. In the morning, I woke up to a 100% charged, fully glowing battery icon. The battery lasted all day with no issues. Every night after that, I just charged it on the wall charger, but did NOT shut it down to see what happened. I am still waking up every morning to a 100% fully charged battery. The battery life seems to get better daily now.
    Today, I ran wifi for about 5 hours because I forgot to shut it off. This was after going to the pool and listening to the iPod on the phone for about 2 hours. And using the phone normally throughout the day, checking mail, sms, etc. Really a full day of work, and my battery is still over 50% full. I purposely didnt connect it to anything during the day for a recharge, not the USB or wall charger.
    Good luck, hope this helps. Id be interested to know if it does.

    Here's my non-scientific experiment.
    After surprising battery drain for the first 10 days or so with not much usage, I completely drained the battery yesterday until the phone shut off.
    I plugged into AC charge and was worried when it didn't seem to even begin charging.
    I plugged into USB, assuming it needed to charge enough to at least complete a sync.
    I left it on USB until about 5-10% charge, then switched it to AC. At about 50% I needed to use it, so I did but sparingly, and put it back on charge, all the while keeping Mail on manual and WiFi off.
    I took it off once more to get it home from the office, then plugged into AC.
    I left that charging overnight.
    I never actually got the "glow", but did get the plug icon showing full charge in the status bar.
    After about 2 1/2 hours this morning, the status has not moved off of 100% (but with little usage as before).
    This is definitely an improvement already though. Hope this helps.

Maybe you are looking for

  • Apps load on boot up

    When I boot my new imac, some apps will load that I do not want.  I have gone into the user login screen and checked the login startup area but it is empty.  How do I get the apps to stop loading on boot up?

  • How to pay developer id with out credit card ?

    my company has not policy pay by credit card. how to pay developer id with out credit card ? Please tell me if you have a choice. Thankyou.

  • How to get a jpeg image to a movie with best possible quality

    I've got a jpeg image from my 2 megapixel digital camera and I'm playing around with converting it to a movie. Yes, its a one image movie. +QuickTime Pro+ does a superb job when I choose H.264, 1024 kb/s, but I can't get iMovie 5.0.2 to give me the s

  • In OEM 12c, how to manage multiple incidents at the same time?

    Hi, Is there a way to manage multiple incidents at the same time? For example, if I want to assign owner for multiple incidents in the incident manager, is there a way to do this? Thanks for the help.

  • Jars For Java Proxy

    Hi all I am creating a Java Proxy application. While importing the proxy zip created to my NWDS project I am getting the error due to missing jar files. Can anyone tell me which all jars have to be added and which all jar files are required. Regards