Escape double quotes in replace formula in runcat.cmd

Hi All,
We are using command line (runcat.cmd) for search and replacing strings. I need to escape doble quotes from the formula. Please suggest a way to do it.
For e.g,
I want to replace
<sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">May</sawx:expr>
with
<sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">Jun</sawx:expr>
The complete string "<sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">May</sawx:expr>" is not working as we need to
override the double quotes.
If anyone has achieved this, please let us know.
Thanks,
Nithin

Hi MK,
We want to ensure that this replace does not have unnecessary impacts. i.e. if a column formula contains "May", it should not be changed.
The no of such reports are huge, hence we can not go to each and every report and modify the XML.
Any other ideas?
Thanks,
Nithin

Similar Messages

  • Escaping sql quotes manually. (replace function)

    I can't get a simple replace to work and am surprised at myself.
    How do I replace every occurrence of either a 'single or "double quote with a backslash+quote (\' or \")?
    (I need it for mysql escaping of selects. Before you jump that prepared statements do it, yes but Jboss-ejb does not, and I don't know how to tell jboss to do so.)
    Anyhow this is a basic Java question, I tried the following to no avail:
    public static String escapeMySqlSelect(String s){
         if ((s.indexOf("\"") >=0) || (s.indexOf("\'") >=0)) {
              s = s.replace("\"","\\\"");
              s = s.replace("\'","\\\'");
              return s;
    }Whatever I try as the second argument for the replace, I get 1 of the following:
    1) Same as original string.
    2) TWO backslashes+quote.
    3) A red-flag from Eclipse with some obscure error message. (Won't compile.)
    Thanks
    -nat

    Further research;
    Jboss automatically escapes the string internally (likely via prepared statement), therefore causing a problem if I also escaped it. BUT, I have yet to figure out exactly when it does so.
    [And this threw me off completely ]There is definetly a BUG in ECLIPSE's (3.1) debugger!
    The 'variables ' panel does not show the true value of the returned string. In other words, a println of the returned string will DIFFER with what the debugger is showing as the value.
    Anyone with Eclipse can try it; with or without j2ee.
    -nat

  • Escape double quotes

    hey, how to escape the double quote in xml document?
    eg. for description="SHAFT X 10" "
    <xml_header id="0" action="Export" from_loc="KJA" to_loc="" doc_model="SpInventory" doc_key="" doc_ref_no="" done_by="j">
    <xml_header.items>
    <sp_inventory id="1028" description="SHAFT X 10" " category="BELL" />
    </xml_header.items>
    </xml_header>
    i write the XML file in this way:
    String exportFile = dir + rename(fileName);
                File file = new File(exportFile);
                PrintWriter fout = new PrintWriter(new FileWriter(file));
                ObjectXMLWriter writer = new ObjectXMLWriter(fout);
                writer.write(ob);
                fout.close();Pls help. Thanks.

    Sorry, wrong forum

  • Javax.mail.internet.AddressException how to escape double quote

    When I try and parse the following internetaddress:
    InternetAddress.parse("sevsev o'first sevsev o\"last <[email protected]>")I get the following stacktrace:
    Tomcat Log [(CKY50) 2006/09/27 15:26:29.217]: 4 Email.setReplyToAddresses() javax.mail.internet.AddressException: Missing '"' in string ``sevsev o'first sevsev o"last <[email protected]>'' at position 52
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:676)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:506)How do I escape the double quote? Thanks in advance!

    Thanks for the quick response, I tried that and got the same stacktrace:
    Tomcat Log [(3YVJS) 2006/09/27 15:44:38.554]: 4 Email.setReplyToAddresses() javax.mail.internet.AddressException: Missing '"' in string ``sevsev o'first sevsev o"last <[email protected]>'' at position 52
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:676)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:506)

  • Escaping double quotes and/or semi-colons in connection string

    Can someone show me a working example of a connection string that uses a password that contains a double quote (") and another example that has a password that contains a semi-colon.
    I cannot get this to work and I can't find anything in the documentation.
    Thanks.

    You didn't say what part of the .NET documentation this came from. I tried this with ODP.NET and I was unable to get it to work.
    Did you try it?
    here are the same tests I've been trying. Can someone please provide me with a working example.
              static void Main(string[] args)
                   OracleConnection oc=null;
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=te\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        Console.WriteLine("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc=new OracleConnection("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=\"te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\\\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
              }

  • How to escape double quotes in database link login

    CREATE DATABASE LINK AA
    CONNECT TO NAME
    IDENTIFIED BY PASS"WORD
    USING "DOMAIN"
    given error of missing double quote identifier. already tried PASS\"WORD, 'PASS"WORD', \PASS"\WORD, \"PASS\"WORD, PASS+CHAR(34)+WORD. no luck.
    I am not in position to change the database password. It can be successfully connected without database link.
    Thanks for any comment.

    How about:
    begin
      execute immediate 'CREATE DATABASE LINK AA CONNECT TO NAME IDENTIFIED BY PASS"WORD USING "DOMAIN"';
    end;

  • Loading csv file trying to replace double quotes

    Hi, I am trying to load a csv file with a field with double qoutes that I want to replace the double qoutes to one. The CSV file I will enter
    "TEST,2345" in a field and when it loads its as ""TEST,2345""
    So I got this code to handle it.
    Pattern quotesRegex = Pattern.compile("\"\"");
              Matcher m = fieldRegex.matcher(line);
              while (m.find()) {
                   String field;
                   if (m.group(1) != null) {
                        // If a quoted string was matched replace escaped double quote,
                        // "" with "
                        field = quotesRegex.matcher(m.group(1)).replaceAll("\"");
    else {
                        field = m.group(2);
                   fields.add(field.trim());
    I want to change a line like this
    D,,""TEST,2345"",46,,
    to
    D,,"TEST,2345",46,,
    but afterwards nothing has changed the record looks as below
    D,,""TEST,2345"",46,,
    Whats wrong with this?
    thanks

    I simply created a simple csv file with one field that I entered a double qoute of "TEST,2345"
    Later when reading in the file(using the code I pasted in) I can inspect it and its """TEST,2345"""
    The relaceAll doesnt seem to change anything(nor did my code). So I was stumped. thanks

  • Double Quotes in MaxL Strings

    I am trying to pass in a calc script string from a Perl script to a MaxL script. The calc script needs double quotes around some of the member names (yes, I know I can create aliases with underscores to work around this, but I can't believe this isn't possible). I can escape the double quote characters in Perl, no problem. But the double quotes just get stripped by MaxL. Here is an example:<BR><BR>MAXL> echo 'I am "quoting" this';<BR><BR>I am "quoting" this<BR><BR>MAXL> set X = 'I am "quoting" this';<BR><BR>MAXL> echo $X;<BR><BR>I am quoting this<BR><BR>MAXL><BR><BR>There is nothing in the docs about escaping double quote characters. I've tried using backslash, no luck there. I've tried using double double quotes and they all get stripped. I've tried doing this inside single quoted strings and double quoted strings - no joy whatsoever. The funny thing is the example above, where simply echoing the literal string works, but assigning it to a variable strips out the double quotes.<BR><BR>Does anyone know how to get double quotes into a MaxL string variable? There has to be a way...<BR><BR>Thanks,<BR><BR>James

    Yes, I've dealt with enclosing variables in double quotes in order for MaxL to parse them properly, but what I'm trying to do is use a variable that contains a double quote. Such as:<BR><BR> set QuoteVar = 'I am "quoting" this';<BR><BR>I'm trying to set substitution variables via MaxL, and some of my existing sub vars have double quotes in them so that they can be used to store member names that appear in calc scripts. As I said, I know I can accomplish this with an alias table that creates a version of the member name that doesn't need quotes, but that's a whole deal to maintain just for this one thing and it seems overly burdensome for such a simple task.<BR><BR>Also, as I said, MaxL does fine with double quotes in literal strings, it's only when assigned to variables that it always strips them out. I want to create a relatively generic script for setting sub vars, so I need to pass variables around. Just calling MaxL from Perl and passing in parameters that get converted to $1, $2, etc. causes these double quotes to get stripped.<BR><BR>So, is there any way around this?<BR><BR>Thanks,<BR><BR>James

  • Regular Expression: Extract Subgroup Content between Double Quotes

    I am using java Pattern and Matcher to match the content between the double quotes. But the result is not what I expected.
    Here are some of my code:
    String s="\"C:\abc\"'; //notice the inside double quotes are escaped double quotes.
    Pattern p= Pattern.compile("\"(.+)\"");
    Matcher m=p.matcher(s);
    if(m.matches()){....}
    Result====:
    m.groupCount()=1,
    m.group(0)="C:\abc"
    But what I want is C:\abc instead of "C:\abc". I am also confused about the group number. If group(0) matches the whole string implicitly, group(1) should represent the subgroup (.+) in the above example, right? Thanks.

    Hi,
    You probably have another error in your code.
    Execute this.
    class Test {
        public static void main(String[] args) {
            String s= "\"C:\\abc\"";
            Pattern p= Pattern.compile("\"(.+)\"");
            Matcher m=p.matcher(s);
            if(m.matches()){
                System.out.println(m.groupCount());
                System.out.println(m.group(0));
                System.out.println(m.group(1));
    }It prints
    1
    "C:\abc"
    C:\abc/Kaj

  • Re: Using double quotes with CellWrapper parameter on rwservlet

    I'm on 11.1.2 on Windows 2008 and I cannot for the life of me get a delimited report to generate with a double-quote cell wrapper.
    I've tried every suggestion that I can find, including the ones in this thread, but nothing seems to work.
    I reliably used delimiter=',' and cellwrapper='"' with 9i and 10g reports, but I can't find anything that does the trick in 11g.
    Any hints?
    Thank you!

    A little update....
    I was able to successfully generate a comma-separated report with a double-quote cellwrapper by creating a wrapper.cmd file as above with only the following contents:
    cellwrapper='"'
    BUT... I could only get this to work if I submitted the job using a URL to rwservlet. It still doesn't work with rwclient or rwrun. It's better than nothing, but I'd really like this to work with rwclient.
    FYI

  • Double Quotes In LOV Return Value Being Replaced With &qu ot; By APEX 4

    My company recently upgraded our development and test boxes to APEX 4.0.2, which we have been wanting for a while now. We discovered that since the upgrade some of our checkboxes and radio groups no longer work as expected. What I mean by this is that the return values being checked for were not correct, and on several occasions we received PL/SQL errors related to numeric to character conversion issues.
    After debugging some it turns out that we have the following LOV query for one of our Checkboxes:
    select
    statement d,
    stmt_id || '" title="&P20_FORM_STMT. ' || statement || '.' r
    from
    stmts
    The return value for the LOV is setup so that it would return a 508 compliant checkbox. We were told we needed a title for each value of a checkbox or radio group to be 508 compliant. These titles must also be relevant to the selection being made, hence the substitution string being used in the return value.
    What I discovered in all of this is that APEX 3.2 did not convert the double quotes in our return value to &qu ot;, but APEX 4.0.2 does. This causes the value of any given checkbox or radio group to look like the following:
    value="1&qu ot; title=&qu ot;This is the statement that I have made."
    And what we are looking for, and what APEX used to do is this:
    value="1" title="This is the statement that I have made."
    Does anyone know a way to prevent APEX from converting the double quotes to &qu ot;, or is there a way to insert an element attribute for each checkbox or radio group value that contains a substitution string?
    Thanks in advance!
    Pastey

    ryansun wrote:
    4.2.1
    Hi,
    I have a classic report, which has a count column that is hyperlinked. using the standard apex column hyperlink option. In that we have the option of passing values. I noticed that when I am passing a value which has "/" in it, it replaces the / with & #x2F;
    I have created a application item which I am populating with the report column.
    Because of which I cannot use that value in the report query.
    Any suggestions?Yes. Don't pass string values in URLs. Especially where it is possible for these strings to contain URI reserved or APEX sensitive characters. This might work for a while but your application can be broken months from now by users including a "&" or ":" in data that gets passed as a URL parameter. Whilst it is possible to escape strings to make them URL- and APEX parameter-safe, it is much better practice to avoid the problem altogether.
    Exposing data in the URL may also introduce security vulnerabilities. Also note that the maximum length of a URL in Microsoft Internet Explorer is about 2KB, which can easily be exceeded by throwing a few string values at it.
    Only use discrete alphanumeric key values as URL parameters. In target pages/regions, use these key values to retrieve the required data using item source attributes and processes.

  • How to replace double quotes with a single quote in a string ?

    Hi All:
    Can some one tell me how to replace double Quote (") in a string with a single quote (') ? I tried to use REPLACE function, but I couldn;t get it worked.
    My example is SELECT REPLACE('STN. "A"', '"', ''') FROM Dual --This one throws an error
    Thanks,
    Dima.

    Whether it is maybe not the more comfortable way, I like the quoting capabitlity from 10g :
    SQL> SELECT REPLACE('STN. "A"', '"', q'(')') FROM Dual;
    REPLACE(
    STN. 'A'{code}
    Nicoals.                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to replace single quote with double quote

    hai all,
    i have a problem,
    i am trying insert a string containing single quote into ms-access database.
    it is giving error.
    how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
    insert into database.
    in java.lang.String
    replace () will not work to replace quote with double quote.
    any otherway to solve this problem.
    please mail me to [email protected]
    thank you
    sambareddy
    inida

    java.lang.String.replace () will not work to replace quote with double quote.Really?
    String x = ...
    x.replace( "'", "\"" );

  • Replace Single Quote with double quote

    Hi All,
    I have a String s="help'me'to'replace";
    i want to replace single quote( ' ) in to double quote ( " )
    The final out put should be like this help"me"to"replace
    ( Actually this string i have to pass in to an XML )
    Please help any one

    s.replaceAll("'","\"");{code}
    or just one of the String#replace() methods.
    Edited by: sabre150 on Mar 17, 2009 11:48 AM                                                                                                                                                                                                                                                               

  • Replacing " (double quote) with ' (single quote)

    Hi there,
    I have the following method to manipulate user input. All I want to do is, to replace the double quote with a single quote. The implementation I tried was,
    this.replace(desc, "\"", "'");
    This does not work for me. It jsut removes the double quote and does not introduces the single quote. Could any one please advise?
    Thanks,
    Des
    public static String replace(String line, String oldString, String newString) {
              if(line != null && oldString != null && newString != null) {
                   int index = 0;
                   while ((index = line.indexOf(oldString, index)) >= 0) {
                        line = line.substring(0, index) +
                             newString +
                             line.substring(index + oldString.length());
                        index += newString.length();
              return line;
         }

    Bad luck.. I am unable to get it still.
    This is the code I am using (implemetation is in a JSP. I am using this code to test it).
    public class Test{
    public static void main(String args[]){
         String s = args[0];
         Test t = new Test();
         String doubleQuote = "\"";
         System.out.println(" output :"+ t.replace(s,doubleQuote,"'"));
         //System.out.println(" output :"+ t.replace(s,"\"","'"));
         //System.out.println(" output :"+ t.replace('"', '\''));
    public static String replace(String line, String oldString, String newString) {
              if(line != null && oldString != null && newString != null) {
                   int index = 0;
                   while ((index = line.indexOf(oldString, index)) >= 0) {
                             System.out.println(" line count :");
                        line = line.substring(0, index) +
                             newString +
                             line.substring(index + oldString.length());
                        index += newString.length();
              return line;
    }mshn02
    The main problem is I am stuck with the server's version of Java (which I have no control on it). I could not use 1.4.2

Maybe you are looking for

  • Is Adobe Drive being retired & replaced?

    We are working through an implementation of AEM Assets in a cloud-based environment with Adobe managed services (Amazon hosting).  Our Adobe implementation team is having problems getting Adobe Drive to work in the hosted model.  They recently told u

  • File error messages using DiskWarrior-- pList items

    The files shown below are corrupted according to a DiskWarrior file check. It was my understanding with earlier OS versions, that the solution was to discard a bad pList, and then the parent Application (or the system itself) would refresh it in the

  • Will Creative Cloud programs work with Windows Vista?

    The specs say works with XP or Windows 7.  Does this mean they do NOT work with Vista?

  • How to Use 10.1.2 UIX with 10.1.3 ADF?

    The question is if there is a way to make this work? The promised designtime extension is not going to happen. But it would still be great if there was a way to make this work at runtime, because that would buy us the time needed for the conversion t

  • Deleting contacts

    I just bought an at&t palm centro and set up my express mail.  I made a mistake in a setup question and now every contact in my pim is now on my gmail contact list - all 187 lol - how do I delete them - I have spent the past hour reading and searchin