Replace a string except it was replaced

Hey guys:
I met a big problem and would you guys do me a big favour?
I want to replace a part of a text String by some other Strings.
for example,I want to replace the String "ab" into "cd",and the String "cd" into "xx" from the text "abcdefg", and what I expected result is "cdxxefg",but if i call the method

You rperformance has been praiseworthy. Andthere's
no one else to blame but you :)I agree. And, may I please take the blame foryour
typo?It's a conspiracy... that space moved after I posted.
Blame it on... dunno who :)Got to let this poor OP get back to his/her thread, but , keep on blaming it on me. I am a conspiracy all on my own.
RD-R
� {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • The application, C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe, generated an application error The error occurred on 10/01/2009 @ 11:31:59.964 The exception generated was c0000005 at address 7C81BD02 (ntdll!ExpInterlockedPopEntrySListFault)

    Hi,
    I get this error randomly when i run my VB 6.0 application which calls Photoshop CS2 actions. I went through many forums, but could not manage to get the right solution for this.
    "The application, C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe, generated an application error The error occurred on 10/01/2009 @ 11:31:59.964 The exception generated was c0000005 at address 7C81BD02 (ntdll!ExpInterlockedPopEntrySListFault)
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."
    OS: WIndows Server 2003 SP2
    Photoshop CS2
    ANy help on this will be highly appreciated.
    Thanks in advance,
    Smiley

    I see this sort of error notice in Bridge and Photoshop, preceded by the message " Photoshop (or Bridge) has encountered a problem and must close. Tell MS.
    Yes or No."
    It most frequently happens in PS when running Dfine 2.0. I have no clue what triggers the Bridge closure. It happens randomly.
    CS3, so nobody gives a tinkers dam, I suppose.
    I see this kind of message in software testing on a regular basis. Of course, when the test is under way, the software is generating a detailed log file which we package up as part of a bug report. Then at the bug scrubs, lively discussions ensue as to who has to fix what!
    I can only image what would happen if the Dfine people and the PS people had to sit through one of those!

  • The exception 'CX_RSR_X_MESSAGE' was raised

    Hi Forum,
    i am using standard extractors 0co_om_wbs_6 loading data  into ods i am not using any routines .when i trigered the load it is giving short dump  with this  error
    <b>The exception 'CX_RSR_X_MESSAGE' was raised but was not caught at any stage in the call hierarchy.</b>
    So plz comment on this issue.....

    Hi Prathap,
    Which version you are working on?
    Go through the link http://documents.bmc.com/supportu/documents/07/07/50707/Output/TR4350_patch2.htm.
    SAP has provided some patches for the same.
    Hope it helps,
    Sunil.

  • Exception 'CX_RSR_X_MESSAGE' was raised when doing the Change Run

    Hi ,
    Change Run is not happening and it is throwing runtime error "The exception 'CX_RSR_X_MESSAGE' was raised, but it was not caught anywhere  along the call hierarchy."
    When ever I am trying to "Monitor and Start Terminated Change Runs" the same error is happening.
    Below is the error I see in the Job Log
    Job started
    Step 001 started (program RSDDS_AGGREGATES_MAINTAIN, variant &0000000000054, user ID)
    SQL: 06.03.2009 09:55:59 
    TRUNCATE TABLE "/BI0/0600001776"
    SQL-END: 06.03.2009 09:55:59 00:00:00
    SQL: 06.03.2009 09:56:01
    TRUNCATE TABLE "/BI0/0600001470"
    SQL-END: 06.03.2009 09:56:01 00:00:00
    ABAP/4 processor: UNCAUGHT_EXCEPTION
    Job cancelled
    Any help on this would be great
    Thanks
    Subbu

    Hi,
    I guess there was nothing to change with tht,  the log was simply showing tht ur change run was performing on tht table....
    Chk on which object ur running this? whether any load got failed for this...?
    Now restart the same run from the EXECUTE button in the window of monitor and start terminated change runs..... i guess it may finish...
    rgds,

  • Exception XADataSource was null

    Greetings
    I am using jdev 10.1.2 and when I run my program it works the first time, then if I rerun it without killing off the embedded OC4J I get hte following error
    06/03/13 14:43:18 Error updating application current-workspace-app: Error initializing ejb-module; Exception XADataSource was null
    this is quite annoying, does anyone know what causes this.
    Thanks
    troy

    Hi,
    PLease check the data-sources.xml:
    <data-source class="com.evermind.sql.DriverManagerDataSource" name="OracleDS" location="jdbc/OracleCoreDS" xa-locatio
    n="jdbc/xa/OracleXADS" ejb-location="jdbc/OracleDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="scott" pass
    word="tiger" url="jdbc:oracle:thin:@//localhost:1521/oracle.regress.rdbms.dev.us.oracle.com" inactivity-timeout="30"/>
    <data-source location="jdbc/los" class="com.evermind.sql.DriverManagerDataSource" password="" max-connect-attempts=
    "20" xa-location="jdbc/xa/los" ejb-location="jdbc/los" schema="<schema_name>" connection-driver="oracle.jdbc.driver.OracleDriver" us
    ername="casuti" url="jdbc:oracle:thin:@//<ip:port>/<instance name>" name="jdbc/los"><description>jdbc/los</description></data-so
    urce></data-sources>
    Please suggest if this is correct?
    Thanks

  • The exception 'CX_RSR_X_MESSAGE' was raised while loading the data

    Hello SDNERS,
    I am lworking in PA module, I have loaded the master data successfully, while loading th transaction data in 0PA_C01, it is taking too much time, when i debgug I am getting below Exception :-
    The exception 'CX_RSR_X_MESSAGE' was raised, but it was not caught anywhere
    along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program 'SAPLRRMS' has to be
    terminated.
    Kindly suggest.
    Thanks
    Shalini

    Hi Shalini
    I have the same problem.
    Note 1157796 apply for SAP BI release 700 and 710 only . what do you use SAP BI Release?
    I install BI Release 701, so i solve the problem not yet.
    Please help me the solution for this error.
    Thanks

  • Io exception: socket was closed ????? Error 17002

    Hi I am getting the following exception when connecting to Oracle 9i through JDBC...The code uses connection pooling initialized within a Lotus Domino Pooling and works great for about 8-12 tries and then starts erroring out....any help would be appreciated.
    02/21/2002 08:50:27 PM Addin: Agent printing: Message: Io exception: socket was closed
    02/21/2002 08:50:27 PM Addin: Agent printing: SQLState: null
    02/21/2002 08:50:27 PM Addin: Agent printing: ErrorCode: 17002
    02/21/2002 08:50:27 PM Addin: Agent error message: java.lang.NullPointerException
    02/21/2002 08:50:27 PM Addin: Agent error message: at com.ext.connector.RelData.executeQuery(RelData.java:416)
    02/21/2002 08:50:27 PM Addin: Agent error message: at com.ext.connector.Connector.open(Connector.java:487)
    02/21/2002 08:50:27 PM Addin: Agent error message: at JavaAgent.NotesMain(JavaAgent.java:20)
    02/21/2002 08:50:27 PM Addin: Agent error message: at lotus.domino.AgentBase.runNotes(AgentBase.java:160)
    02/21/2002 08:50:27 PM Addin: Agent error message: at lotus.domino.NotesThread.run(NotesThread.java:203)

    I don't see any error on the Oracle side which makes me suspect if Domino itself is shutting down the TCP socket as part of a scheduled task/background process. Domino uses JDK ver. 1.1.8. I have tried using both classes111.zip and classes12.zip separately. Also tried including the jdbc 2 jar file. Nothing seems to prevent the socket from getting closed abruptly. Any more suggestions are welcome.
    Thanks,
    Jacob.

  • J2CA0056I Exception in WAS

    While running the soak test for our application, the following error was found in the SystemOut.log
    [10/25/05 16:39:38:089 MST] 1d24403f ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$BIDSQCF$JMSManagedConnection@1160003643. The exception which was received is javax.jms.JMSException: MQJMS2007: failed to send message to MQ queue
    Can anyone let me know whats the cause for this exception and the solution?

    We have the same problem, has anyone find the solution for it.
    Many people suggests it's the size of the message but in our case it happens when volume of messages is higher

  • Replace String except  it had been replaced

    Hey guys:
    I met a big problem and would you guys do me a big favour?
    I want to replace a part of a text String by some other Strings.
    for example,I want to replace the String "ab" into "cd",and the String "cd" into "xx" from the text "abcdefg", and what I expected result is "cdxxefg",but if i call the method replaceAll() twice the result will become "xxxxefg".could anyone give me a hand? Any ideas will be appreciated.
    Thank you!

    You rperformance has been praiseworthy. Andthere's
    no one else to blame but you :)I agree. And, may I please take the blame foryour
    typo?It's a conspiracy... that space moved after I posted.
    Blame it on... dunno who :)Got to let this poor OP get back to his/her thread, but , keep on blaming it on me. I am a conspiracy all on my own.
    RD-R
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I'm getting exception index was out of bound how should i fix it ?

    In a timer tick event i have:
    private void timer1_Tick(object sender, EventArgs e)
    if (htmlloaded == true)
    try
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    filename = uri.Substring(49);
    webBrowser1.Navigate(uri);
    htmlloaded = false;
    timer1.Enabled = false;
    counter++;
    countpages++;
    catch (Exception err)
    string ttt = err.ToString();
    if (countpages == numberofpages)
    timer1.Stop();
    The problem is that in the end forumsIds and counter have the same number. forumsIds have 574 items and in the end counter is 574 too. And counter should be allways less then the forumsIds.

    Michael i solved it this way.
    First i changed in the top of the form the variable counter to value 0 instead 1 so it will start as 0.
    In the GetHtmls method where i used the index 0 first time i did:
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    countpages ++;
    counter ++;
    So first time counter is 0 index 0 .
    Then i move it up by one so now counter value is 1.
    Now the timer tick event:
    private void timer1_Tick(object sender, EventArgs e)
    if (htmlloaded == true)
    try
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    filename = uri.Substring(49);
    webBrowser1.Navigate(uri);
    htmlloaded = false;
    timer1.Enabled = false;
    counter ++;
    countpages ++;
    if (counter == numberofforums)
    timer1.Stop();
    catch (Exception err)
    string ttt = err.ToString();
    So now counter is 1 i'm navigating then counter is 2 now it will navigate again when counter is 2.
    Since i navigated first time once when it was 0 this is 3 times.
    So now counter will be 3 and the numberofforums is also 3.
    And in the document completed event i'm also checking if counter == numberofforums:
    if (counter == numberofforums)
    timer1.Stop();
    else
    timer1.Enabled = true;
    If counter is not equal to numberofforums keep navigating once they are equal stop the timer and finish the navigations.
    So in the end i started from index 0 (counter = 0 ) and navigated last time when counter was 2. That's 3 times navigations. And counter is now 3 and i navigated to 3 forums.
    I hope i did it right at least it's working like i wanted i think.
    Navigated 3 times and there are 3 forums so i think it's logic.

  • Problem in reading a string back which was stored using custom binding.

    Hi All,
    i use below codes to do custom binding
    public class CSVRecord {    
    private String key;
    /** To keep how many values we have for a key.
    * This is used to retrive values' element during constructing CSVRecord object back from stream.
    private int valuesSize;
    * to keep values for a key
    private String[] values;
    public CSVRecord()
    public CSVRecord(String key, String[] values)
    this.key = key;
    this.values = values;
    this.valuesSize = this.values.length;
    public String getKey() {
    return key;
    public void setKey(String key) {
    this.key = key;
    public String[] getValues() {
    return values;
    public void setValues(String[] values) {
    this.values = values;
    public int getValuesSize() {
    return valuesSize;
    TupleBiniding code:
    public class CSVRecordTupleBinding extends TupleBinding {
    public void objectToEntry(Object object , TupleOutput tupleOutput)
    CSVRecord record = (CSVRecord)object;
    tupleOutput.writeString(record.getKey());
    tupleOutput.writeInt(record.getValuesSize());
    for(int i=0;i<record.getValuesSize();i++)
    tupleOutput.writeString(record.getValues());
    public Object entryToObject(TupleInput tupleInput) {
    <font color="red"> String key = tupleInput.readString(); </font> <br>
    int valuesSize = tupleInput.readInt();
    String[] values = new String[valuesSize];
    for(int i=0;i<valuesSize;i++)
    values[i] = tupleInput.readString();
    return new CSVRecord(key,values);
    But when i reconstruct an object using cusom binding i face below exceptions
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 8
         at com.sleepycat.util.UtfOps.getZeroTerminatedByteLength(UtfOps.java:38)
         at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:150)
         at com.ml.odr.regression.comparison.CSVRecordTupleBinding.entryToObject(CSVRecordTupleBinding.java:30)
         at com.sleepycat.bind.tuple.TupleBinding.entryToObject(TupleBinding.java:73)
    This is especially happens at the line where i read the key back.
    could you please advise ?.
    Thanks,
    Srini

    Hi Srini,
    I don't see anything obviously wrong with the code you posted, except perhaps that the setter, setValues, does not update valuesSize -- you really don't need the valuesSize field, you can use the array length instead.
    There must be something wrong elsewhere in your program. Please post a complete test program, that has a main() and can be run with only the JE jar file, that demonstrates the problem.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ERROR : Exception "CX_RS_INPUT_INVALID" was raised while activating InfoSet.

    Hey Guys,
    I am getting an error while activating an InfoSet as:
    "An exception has occurred which is explained in more detail below. The
    exception, which is assigned to class 'CX_RS_INPUT_INVALID' was not caught and
    therefore caused a runtime error. The reason for the exception is:
    Inconsistent input parameter (parameter: <unknown>, value <unknown>)"
    The Infoset consists of two InfoCubes.
    An InfoCube containing quite a few characteristics as attributes on a field and one attribute having a compounding attribute as 0CALYEAR.
    Attached is the screenshot of the error message.

    Hi Bhaskar,     It's a not clear error, but in this thread you could find the answer at the end. http://scn.sap.com/thread/2076907 Regards.

  • Catch String Exception

    I want the user only to put in the string"n" and catch any other errors. If the the user enters the string "n", the screen will print "i". In this case, what should i put for the catch statement?
    that's what i did:
    try {
         System.out.println("Enter n");
         Scanner input = new Scanner (System.in);
         String word = input.nextLine();
    catch (Exception e){
         System.out.println("");
    System.out.println("i");

    First off, where you have the print of the letter 'i' will happen whether or not an exception is caught, which is probably not what you want.
    Second, the code in your catch block will not be executed currently if the user types something other than 'n'. In your try block you got to test the input and if it is bad, you need to throw an exception.
    Note to teachers, i will find you and slap you silly for given students bad example problems like this.

  • Find files that match with given string, except one character in a fixed position

    Hi,
    I want to find files in a directory with a given string (ss-20140129-process-000*.sdx), where only one character will be mismatched, so have to use wildcard for that character. This means I am looking for filenames where everything needs to be matched except
    one character in position of "*". For the samples given below: 1st 3 files matched with the given string, but last 3 files have not matched, so first 3 files will be counted.
    ss-20140129-process-0001.sdx
    ss-20140129-process-0004.sdx
    ss-20140129-process-0009.sdx
    zx-20140129-process-0001.sdx
    bt-20140129-process-0002.sdx
    zx-20140129-process-0001.sdx
    I can use the command like (GCI -path $folder -filter ss-20140129-process-000?.sdx), BUT problem is i am building a string for the filter (code given below), where i DO NOT know how to use "?" within the string to make a character exception.
    Code:
    $datevalue = [datetime]::parseexact($trandate,"MMddyy",$null)
    $yyyymmdd = $datevalue.tostring('yyyyMMdd')
    $FileToCheck = ("ss-"+$yyyymmdd+"-process-000?.sdx")
    GCI -path $folder -filter $FileToCheck
    But it's definitely NOT working for syntax problem.
    Any help?

    I don't think it's a syntax issue in the filter.  This works fine for me:
    $yyyymmdd = '20140129'
    $FileToCheck = ("ss-"+$yyyymmdd+"-process-000?.sdx")
    Get-ChildItem -Path . -Filter $FileToCheck
    <#
    Output:
    Directory: C:\source\Temp\sdxtext
    Mode LastWriteTime Length Name
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0001.sdx
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0004.sdx
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0009.sdx
    #>
    You can try adding some debug output right before the call to Get-ChildItem. Check the values of $Folder and $FileToCheck, make sure they're correct. You can also fiddle with the values and call Get-ChildItem manually until it works, which would then tell you
    how the code needs to be changed.

  • JSTL c:import tag exception on WAS 6.20

    Hi all,
    has anyone been able to use the c:import jstl 1.0 tag on WAS 6.20?
    Everytime we access it it throws the following error:
    Exception occurs while processing a request to the servlet: jsp.
    javax.servlet.jsp.JspTagException: Since tag handler class org.apache.taglibs.standard.tag.el.core.ImportTag implements BodyTag, it can't return Tag.EVAL_BODY_INCLUDE
    Most, if not all, other tags seem to work fine, just this one doesn't. The same testpage and jstl version works fine on other non-SAP J2EE engines we have tested it on.
    Best Regards,
    Kalle Pokkinen

    Hi,
    This answer is mostly for reference - see OSS 0371142 2004 "JSP Standard 1.2 versus 1.1" for details.
    Best regards,
    Todor

Maybe you are looking for