Invalid String literal in a String

Hi,
I have some trouble dealing with the following line(s) of code:
rtfFile.addElement("{\rtf1\ansi\ansicpg1252 \deff0\deflang1033\deflangfe1031{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}");
Basically, rtfFile is an enhanced Vector being able to write it's elements into a ascii file. Now, during compilation of my program, the compiler stops, telling me that it is an invalid string literal and cannot contain '\?'. I think it has something to do with unicode, but so far I couldn't get any further.
Please help, it's urgent!!
cu,
Dennis

\ is the escape character. It allows you to represent characters like line feeds (\n), backspaces (\b) and quotes (\") in literal Strings. To avoid ambiguity (should "\" be a backslash in quotes or a beginning of a string starting with a "-character?) the escape character itself must be escaped, so replace \ with \\.

Similar Messages

  • ERROR reports.reportdefinition : com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

    I have developed Java web application which uses Crystal Report 2013 , java 1.6 , Windows 32 bit System, All the reports are loading fine in the Following environment
    Development Environment
    Windows7 Professional Service pack 1 -32 bit
    Java - 1.6
    Internet Explorer 11
    Oracle Client 10g 32 bit ODBC driver
    Testing Environment
    Windows Server 2008 R2 Enterprise - 64 bit
    java 1.6
    Internet Explorer 9
    Oracle Client 11g 62 bit ODBC driver
    While loading reports in the 64 bit server the error occurs
    ERROR reports.reportdefinition :  com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
    ERROR dataengine.datasource : Failed to read next recurring database record: database row set error.
    com.crystaldecisions.reports.reportdefinition.datainterface.j: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.reportdefinition.datainterface.q.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.m(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.l(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
        at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.ab(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.if(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.ca.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.void(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.aE(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
        at com.erm.controller.ALMReportsController.queryDll(ALMReportsController.java:1681)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.erm.authentication.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:658)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.l.bN(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.eg(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.e(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.f(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.dy(Unknown Source)
        ... 89 more
    Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getBigDecimal(Unknown Source)

    A few things to note:
    1) Crystal Report 2013 doe snot install any SDK. Thus the assumption is that you are using CR from teh following link:
    SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download
    2) Since you are using a 64 bit connection (Oracle Client 11g 62 bit ODBC driver) you will have to make sure you are using 64 bit JVM. Otherwise, follow Dell's advice and use a 32 bit ODBC datasource.
    3) On one test you are using Oracle Client 10g 32 bit ODBC driver and the other you are using Oracle Client 11g 64 bit ODBC driver. You might want to see if you can run your app using Client 11g 32 bit ODBC driver.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada

  • Error: "Invalid string or buffer length" when using SQLColumns!

    I am calling SQLColumns through the Oracle ODBC driver to get the column information of a table. The Client version is 9.0.1.0 and the ODBC driver version is 9.0.1.8. If I am querying a table that does not has a long table name, fine; if I am querying a long table name, failed and reporting:
    [Oracle][ODBC]Invalid string or buffer length.
    Tried with MS Oracle driver, no problem. Anybody can help?
    Thanks in advance.

    the name is very long, like 'aaaabbbbccccddddeeeeffffrrrrdddaaa'. Maybe more than 20 charactors. I haven't find the exact number, before which SQLcolumns works, after which SQLColumns stop working.

  • 40357-invalid string in example record query not issued

    hello experts,
    i am using forms 10g.in query mode i face that error 40357-invalid string in example record query not issued.
    i used these code in key-next-item trigger
    PROCEDURE KN_FOR_QUERY IS
    BEGIN
    IF :global.navigation = 'D' AND :global.mode = 'M'
    THEN
    IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
    THEN
    :global.temp_div_code:= :po_m.po_div_code;
    :global.temp_po_num := :po_m.po_num;
    :global.temp_po_ex_work := :PUR_DELV_D.DELV_EX_WORK;
    :global.temp_modi_num:= :po_m.po_modi_num;
    IF GET_BLOCK_PROPERTY(:SYSTEM.CURSOR_BLOCK,QUERY_HITS)=0
    THEN     
    -- message('1---'||:SYSTEM.CURSOR_BLOCK);
    -- message('2---'||:SYSTEM.CURSOR_BLOCK);
    GO_BLOCK(:SYSTEM.CURSOR_BLOCK);
    CLEAR_BLOCK(no_validate);
    EXECUTE_QUERY;
    -- ELSE
         -- NEXT_ITEM;
    END IF;
    -- ELSE
    -- mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered For Query...');
    END IF;
    ELSIF :global.navigation = 'D' and :global.mode = 'Q'
    THEN
    IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
    THEN
    MESS('Press Execute query button');
    go_item('tools.execute_query');
    ELSE
    mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered For Query...');
    END IF;
    ELSIF :global.navigation = 'D' and :global.mode = 'A'
    THEN
    IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
    THEN
    NEXT_ITEM;
    ELSE
    mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered...');
    END IF;
    END IF;
    END;
    Thanks
    Ravi

    Hi Ravi
    u may need to debug to find out where and when the error exist pls note the following
    Error Message: FRM-40357: Invalid string in example record. Query not issued.Error Cause:In query mode, you entered an invalid ALPHA or CHAR value in the example record.
    Action:Correct the entry and retry the query. Level: >25
    Type: Errorpls verifying that u r entering 1 char for global variable to be assigned so any number between 2single coat is considered a character not s number .
    Amatu Allah

  • Looking for Regex library to generate valid/invalid String

    Hi-
    My project use MDA (domain object are specified from an XML file) and we generate the domain, transfer object, DAO, services and controllers, flex controller, flex services and flex .as files.
    Now we want to generate the Unit Test Case. Of course, we can't cover everything. What we can cover is most domain fields validation, such as length, max value, min value and perhaps regex matching.
    So, what I'm looking for is a library that allow me to generate a valid and invalid String based on a given Regex pattern. So far, I have found Google Xeger, which only allow me to generate valid String based on the Regex pattern. I'm also looking for a library that will allow me tpo generate invalid String for a given regex.
    Anyone know of such library. I really don't want to parse the Regex to come up with an invalid String (as I am not strong in Regex).

    T.PD wrote:
    915826 wrote:
    My project use MDA (domain object are specified from an XML file) and we generate the domain, transfer object, DAO, services and controllers, flex controller, flex services and flex .as files.
    Now we want to generate the Unit Test Case. What do you think you're going to check with a <b>generated UnitTest</b>?
    The only thing you can check is the that your Code Generator generates a bunch of Classes (the Tests) the same way like another bunch of Classes (the production code). So unless you wrote the Code Generator: What does a generated Test tell you about the corerectness of your Domain Model?
    IMHO generated tests are nothing more than a placebo...
    bye
    TPDYou are correct, but it probably doesn't matter. Plenty of people create (or in this wacky case: generate) unit tests because it is company policy that unit tests are there, not because you write them to support your development efforts.
    Example: the company I work for has a whole legion of "PL/SQL developers". In other words: people who write endless amounts of SQL procedures. Company policy goes in effect: all code should be covered by unit tests. Result: unit tests that insert a record and then check if the record is inserted. Unit test that updates a record and then checks if the record is updated. I try to explain to such people: you can be pretty sure the database works, you don't need to unit test it. Blank stares.

  • Invalid string length!    message ODBC Trace Windows Vista Oracle 10gR2

    Hi there
    I have an issue with Oracle 10gR2 installed at Windows Vista Enterprise SP1.
    For troubleshooting purposes for a 3rd partu applications, I need to get ODBC traces.
    the thing is that the SQL statements doesnt appear at all:
    iDocCli be4-131c EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
    HSTMT 0217E470
    UCHAR * 0x00E5A750 [      -3] <Invalid string length!>
    SDWORD -3
    I am getting <Invalid string length!> error message instead of "select ...."
    Same client installed at xp box, but trace is free of those error messages.
    oracle.client","10.2.0.3.0"
    Any help will be appreciated
    RGDS

    It is certified.
    It is a content management software: invesdoc.
    I installed
    Oracle Database 10g Release 2 (10.2.0.3/10.2.0.4) for Microsoft Windows Vista and Windows 2008

  • LPX-00111 invalid string "string" (not a Nmtoken)

    Hi
    I am not Oracle savvy, but I am asking this question on behalf of another group that are having problems using Oracle XML to parse an XML document that my system has generated.
    As part of my DTD, I have the line, which, by the way, is similar to other lines, reads as follows:
    <!ATTLIST eligibleCode rule (E-T | E-NT | NE-T | NE-NT ) #FIXED 'E-T' >
    The XML document and DTD parse fine using Tibco Turbo XML, Xerces Java and C++ Parsers so I think that it is correct XML. However under the Oracle XML implementation, they get the following error which appears to be when parsing the DTD itself:
    LPX-00111 invalid string "string" (not a Nmtoken)
    Cause: Validity Constraint 3.3.1 failed:
    Given thing is not a Nmtoken
    Action: Correct the document.
    Strangle enough, the string "string" does not appear in the DTD or XML document itself.
    Does nyone know how compatible Oracle XML is with things like this and what work around we may need to perform to get Oracle to correctly parse the DTD.
    Many thanks
    Ian

    <!ATTLIST eligibleCode rule (E-T | E-NT | NE-T | NE-NT ) #FIXED 'E-T' >
    ^^^^^^^^^^^^
    Update: We removed the #FIXED 'E-T' from the DTD and replaced it with #REQUIRED and the DTD now loads further but fails in a similar place.
    We are having thoughts that Oracle is not correctly interpreting attributes or attribute definitions that contain a '-' sign.
    Any thoughts
    Thanks
    Ian

  • Semantic Error: invalid string class

    Hi, I upgraded my jdk from 1.4.2.12 to 1.5.0.12. but everytime i try to compile, the error message: "Semantic Error: A candidate for 'String' was found, but it is invalid and needs to be fixed before this type will successfully compile." any thoughts on what to do? thanks!

    [sidekick Sarcastic]
    kinda helps if you could show us the String that the error was pointing to. I dunno, it may kinda sorta help us figure it out, perhaps.
    [sidekick Sarcastic]
    With code tags :)

  • Invalid string in example record. Query not issued.

    I've tried to google this but didn't come up with anything and tried searching this forum but was not returning exact string.
    Does anyone know what this means?
    The form is based on a master (which is a view) and detail records (which is a table)
    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning and Data Mining options

    if you call the enter_query build-in and type a value in one of the database items,
    in the subsequent execute_query forms searches for that value in the assosiated database-column.
    This entered value/s forms call a example record
    in hope, your block don't have too much items, try the following code in your trigger that call the execute_query: execute_query;
    if
      form_failure
    then
      message ( get_block_property ( :system.trigger_block, last_query ) );
      message ( ' ');
    end if;

  • Diagnose a Invalid String/Buffer Length

    Hey everyone,
    If someone could help me out with this, I would greatly
    appreciate it. I have included the code and linked to the database.
    I continue to get this error no matter I do. The most frustrating
    thing is that it only tells me that the error is on line 66. Well
    line 66 tells me nothing. Hopefully someone else can figure it out;
    I sure can't.
    Database

    I often get this when I have manually amended an insert or
    update form, and it is simply due to me missing a value either in
    the form or in the insert code. It may even be that you have copied
    a line of code and not changed the name of a text box or the
    Request.Form insert code that relates to the db column.
    HTH
    Mat

  • Why does DB2 Data Flow Task query does not accept a date coming from a string or datetime variable in SSIS?

    I am trying to compare a DB2 date format to a date variable from SSIS. I have tried to set the variable as datetime and string. I have also casted the SQL date as date in the data flow task. I have tried a number of combinations of date formats, but no luck
    yet. Does anyone have any insights on how to set a date (without the time) variable and be able to use it in the data flow task SQL? It has to be an easy way to accomplish that. I get the following error below:
    An invalid datetime format was detected; that is, an invalid string representation or value was specified. SQLSTATE=22007".
    Thanks!

    Hi Marcel,
    Based on my research, in DB2, we use the following function to convert a string value to a date value:
    Date(To_Date(‘String’, ‘DD/MM/YYYY’))
    So, you can set the variable type to String in the package, and try the following query:
    ACCOUNT_DATE  BETWEEN  '11/30/2013' AND  Date(To_Date(?, ‘DD/MM/YYYY’))
    References:
    http://stackoverflow.com/questions/4852139/converting-a-string-to-a-date-in-db2
    http://www.dbforums.com/db2/1678158-how-convert-string-time.html
    Regards,
    Mike Yin
    TechNet Community Support

  • Double.parseDouble(String) - problems when string is in scientific notation

    Hello guys,
    I'm doing some numerical calculations and I wonder whether it is possible for Double.parseDouble(String) to parse string in the scientific notation i.e. 1.0824234234E-10. Is it the notation itself causing the exception : NumberFormatException or the number is just too big/small and double can't hold it ?
    If it's just the notation how can I fix it ?
    Regards

    i'm not quite sure whether double odoes not allow it.
    perhaps consider the api Double.valueOf() and the testing code provided; reproduced below:To avoid calling this method on a invalid string and having a NumberFormatException be thrown, the regular expression below can be used to screen the input string:
            final String Digits     = "(\\p{Digit}+)";
      final String HexDigits  = "(\\p{XDigit}+)";
            // an exponent is 'e' or 'E' followed by an optionally
            // signed decimal integer.
            final String Exp        = "[eE][+-]?"+Digits;
            final String fpRegex    =
                ("[\\x00-\\x20]*"+  // Optional leading "whitespace"
                 "[+-]?(" + // Optional sign character
                 "NaN|" +           // "NaN" string
                 "Infinity|" +      // "Infinity" string
                 // A decimal floating-point string representing a finite positive
                 // number without a leading sign has at most five basic pieces:
                 // Digits . Digits ExponentPart FloatTypeSuffix
                 // Since this method allows integer-only strings as input
                 // in addition to strings of floating-point literals, the
                 // two sub-patterns below are simplifications of the grammar
                 // productions from the Java Language Specification, 2nd
                 // edition, section 3.10.2.
                 // Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
                 "((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
                 // . Digits ExponentPart_opt FloatTypeSuffix_opt
                 "(\\.("+Digits+")("+Exp+")?)|"+
           // Hexadecimal strings
           "((" +
            // 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
            "(0[xX]" + HexDigits + "(\\.)?)|" +
            // 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
            "(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
            ")[pP][+-]?" + Digits + "))" +
                 "[fFdD]?))" +
                 "[\\x00-\\x20]*");// Optional trailing "whitespace"
      if (Pattern.matches(fpRegex, myString))
                Double.valueOf(myString); // Will not throw NumberFormatException
            else {
                // Perform suitable alternative action
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Double.html

  • Multiple String to search on the "Scan Output: Abnormal String" item

    in the job definition on the run tab on the "option scan output: abnormal string" we use this command pipe to search for the string to force the job to get abnormal status. there are some case that when the job runs and the program being called throws error message other than the string "error". for example it throws "invalid" string to indicate the program has error out. is there a work around to include more than one strings on the commnad pipe? please adivse.
    thanks,
    warren

    Just put a comma between the strings.  If your strings contain spaces you need to put quotes around it.  see below.
    "Not connected","Login failed","File not found","The system cannot find the file specified","Access is denied","Unknown host","Invalid command"

  • Coverting String to Date

    Hi
    Can anyone tell me how can I convert a string to date.
    I have 2 MessageTextInput Component,have set it's datatype as DATE. I want to find the difference between the two dates.
    For this I do pageContext.getParameter("fieldA") and then try to create an object of oracle.jbo.domain.date :
    new Date(pageContext.getParameter("fieldA"))....and say date selected by me is 15-mar-2005...this gives me an exception saying invalid string "MAR".
    Any idea how this issue can be resolved?
    Thanks in advance
    Puja

    Do this
    convert the String object you have to java.sql.Date object using
    stringToDate(String arg) method in oracle.apps.fnd.framework.OANLSServices class
    what you have now is java.sql.Date objects, use compareTo() method in this class(inherited from java.util.Date).
    Thanks,
    Tapash

  • Contain string

    Hello all,
    Can any tell me how i will find perticular word in a string.
    e.g.. s = 'Rajesh Kumar Choudhary'.
    if in this string 'Rajesh' is present then i want give message 'string found'.
    please read sentence carefully.
    Rajesh.

    hi,
    try this code.
    DATA: S TYPE STRING.
    PARAMETERS: P(20) TYPE C.
    S = 'Rajesh Kumar Choudhary'.
    case p.
    when 'Rajesh'.
    perform f_str_chk using p.
    when 'Kumar'.
    perform f_str_chk using p.
    when 'Choudhary'.
    perform f_str_chk using p.
    when others.
    write 'Invalid String'.
    endcase.
    form f_str_chk using l_str(20) TYPE C
    if s  CS  l_str.
    write : 'String found'.
    else.
    write : 'String Not found'.
    endif.
    end form.
    Rgds
    Anver

Maybe you are looking for

  • Trouble viewing .tif files in bridge?

    When I open a folder of images in Bridge I can see the CR2 files but the edited .tif files only appear as a generic .tif icon, and when I press the space bar to try to preview them larger I get that same icon. I can see some of the .tifs as the icons

  • Local Director Load Balancing question

    Using IOS 3.2.2 I have a local director 416 with 2 real servers. I would like to send all traffic to 1 server and if it fails to switch over to the secondary server. The way I see to do it is to use weighted load balancing and set the weight of the 2

  • Cant open .mpg in quicktime

    i cant open some mpgs in quicktime but if i choose a program called vlc they work fine. i know quicktime opened mpgs before. i checked im updated on versions and quicktime is the default program for that file extention. my isight used to record reall

  • Query performance puzzling

    Version: Application Express 3.0.1.00.12 DB: 11.1.0.7.0 Running a query: select to_char(max(to_date(datetime,'DD/MON/YYYY:HH24:MI:SS')),'DD/MON/YYYY:HH24:MI:SS') "Latest upload time" from TBL; gives me a result in .109 sec in SQL DEVELOPER But the sa

  • How to download video and audio files

    Pl tell me how to download mp3 & mp4 files from fox browser