How to extract from a string ?

Hello , I have this string and I need to extract 4 parts (in bold) from the string , my string is :
'(invoice) dear client : tom cruise you Buy *408* from MENA.CA @ *6.93* 01/10/09 watheeqa'
What is the best technique to do that?
Thanks

Hi,
oais wrote:
Hello , I have this string and I need to extract 4 parts (in bold) from the string , my string is :
'(invoice) dear client : tom cruise you Buy *408* from MENA.CA @ *6.93* 01/10/09 watheeqa'
What is the best technique to do that?
ThanksThat depends on how you know the 4 parts are what you showed, and not
'<b>(invoice) dear client: tom</b> cruise you Buy 408 from MENA.CA @ 6.93 01/10/09 watheeqa'
or
'<b>(invoice)</b> dear client: <b>tom cruise</b> you Buy 408 from MENA.CA <b>@</b> 6.93 01/10/09 <b>watheeqa</b>?'
or
'(invoice) dear client: <b>tom cruise</b> you Buy 408 from MENA.CA @ 6.93 <b>01/10/09 watheeqa</b>'
Will there always be exactly four parts you need to pick?

Similar Messages

  • Invoking methods extracted from a string?!?

    Hi everybody. I hope the subject is not confusing. What I'm really looking for is some Perl-like behaviour in Java. In Perl its possible to execute subroutines (basicly methods) extracted from a string ("&sub()"). Is there anything similar in Java?
    What I would like to do is to process a string and if it has a method (object.getTime()), the method will be called and the return value stored in its place.
    Please let me know if more explanation is needed.
    Thanks in advance for all the help!
    Leo.

    I use a language called MUMPS where you can do that as well - execute strings as commands etc. I don't know much about Reflection but it looks like you can get method (Objects) from strings and execute them as well ...

  • How to EXTRACT from one PHOTO to another

    How do I extract from one photo and place in another using PSE 19
    Message title was edited by: Brett N

    You probably mean PSE10 ---Typo?
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object on picture A.
    Go to Edit>copy to put it on the clipboard
    Open picture B
    Go to Edit>paste. A will be on its own layer
    Access the move tool to position A and to resize with the corner handles of the bounding box

  • NPD Metrics - how to extract from the database in a usable format

    Metrics for NPD activities and projects are stored in the database one row for each metric in each activity or project instance. If there are multiple metrics per activity instance, for example, extraction of those metrics yeilds only a list of metrics and values. I'd like to see it in more of a table style output. Can you provide some guidance on how to extract this from the DB using sql? Thx

    Here is the SQL that should help understand the structure. There are a few ways to pull this data in more of a column based approach. This should help you get started.
    select modml.baseName as MetricName, bases.name as Basis, ph.name as Phase,
    fy.name as FiscalYear, gl.Value as Value, UOM.ID as UOM, currml.Name as Currency
    from plmFieldExchangeGlobals gl
    inner join plmFieldExchangeDefinitions fed on fed.pkid = gl.FieldExchangeDefinitionPKID
    inner join plmFieldExchangeDefModels mod on mod.pkid = fed.fkFieldExchangeDefinitionModel
    inner join plmFieldExchDefinitionModelML modml on modml.fkFieldExchangeDefinitionModel = mod.pkid and modml.langID = 0
    inner join plmFieldExchangeBases bases on fed.fkFieldExchangeBasis = bases.pkid and bases.langID = 0
    inner join plmFieldExchangePhases ph on fed.fkFieldExchangePhase = ph.pkid and ph.langID = 0
    inner join plmFieldExchangeFiscalYears fy on fed.fkFieldExchangeFiscalYear = fy.pkid and fy.langID = 0
    left outer join UOM on UOM.pkid = mod.fkCommonUOM
    left outer join commonCurrenciesML currml on currml.fkCurrency = mod.fkCommonCurrency and currml.langID = 0
    where ProjectPKID = '320219992047-072a-4698-a553-de5ec124ff9c';
    Segal

  • How to Extract From Pool Tables

    Hi All,
    Can Somebody help with the Detailed Description how to extract the Data from Pool Tables from ECC to SAP BW
    Thanks
    Sam

    Option 1
    Create Infoset SQ02  on those tables and RSO2 - create generic ds
    Option 2 :Create functional Module and create generic ds using FM
    Replicate DS to BW and Build objects and map them in transformations and create dtp and IP
    Start extraction! .. please search for detailed steps in forum

  • Xpath in BPEL: How to extract from message type to string

    Hi all,
    I am currently trying to extract all content from a special message type to a string. The special message is really just simple XML.
    However, I wish to convert the special domain specific message to a string to send to another partnerlink.
    I figured that it would be a simple matter of using an assign / copy operation using the special message and the ora:getContentAsString function.
    This does not work :-(
    I get the following error in the domain log:
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:getContentAsString(bpws:getVariableData('businessEventBody'))", the reason is FOTY0001: type error.
    Please verify the xpath query.
    Does anyone have any ideas on how to solve this?
    Regards,
    Aagaard

    <p>
    Hi,
    </p>
    <p>
    Let me explain the scenerio:
    </p>
    <p>
    I XSD I have is:
    </p>
    <p>
    &lt;xs:schema xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
    targetNamespace="**************"
    &lt;xs:element name="OrdDesc"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="ord" type="number10" /&gt;
    &lt;xs:element name="ord_name" type="varchar2150" /&gt;
    &lt;xs:element name=ord_add1" type="varchar2240" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="ord_add2" type="varchar2240" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="ord_city" type="varchar2120" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="county" type="varchar2250" minOccurs="0" /&gt;<br /><br /> &lt;/xs:sequence&gt;<br /><br /> &lt;/xs:complexType&gt;<br /><br /> &lt;/xs:element&gt;<br /><br />&lt;/xs:schema&gt;<br /></p><br /><p><br /><br /><br />The runtime XML I would get:<br /></p><br /><p><br /><br /><br />&lt;?xml version="1.0" encoding="UTF-8" ?&gt;<br /><br />&lt;Messages&gt;<br /><br /> &lt;Message&gt;<br /><br /> &lt;family&gt;New&lt;/family&gt;<br /><br /> &lt;type&gt;OrderCreate&lt;/type&gt;<br /><br /> &lt;id&gt;22&lt;/id&gt;<br /><br /> &lt;messageID/&gt;<br /><br /> &lt;routingInfo/&gt;<br /><br /> &lt;messageData&gt;&lt;![CDATA[&lt;!DOCTYPE *************"&gt;<br /><br /> &lt;OrdDesc&gt;<br /><br />  &lt;ord&gt;22&lt;/wh&gt;<br /><br />  &lt;ord_name&gt;Ord1&lt;/wh_name&gt;<br /><br />  &lt;ord_add1&gt;Park Avenue&lt;/wh_add1&gt;<br /><br />  &lt;ord_add2/&gt;<br /><br />  &lt;ord_city&gt;XYZ&lt;/wh_city&gt;<br /><br />  &lt;county/&gt;<br /><br /> &lt;/OrdDesc&gt;]]&gt;&lt;/messageData&gt;<br /><br /> &lt;/Message&gt;<br /><br /> &lt;Message&gt;<br /><br /> &lt;family&gt;New&lt;/family&gt;<br /><br /> &lt;type&gt;OrderMod&lt;/type&gt;<br /><br /> &lt;id&gt;22&lt;/id&gt;<br /><br /> &lt;messageID/&gt;<br /><br /> &lt;routingInfo/&gt;<br /><br /> &lt;messageData&gt;&lt;![CDATA[&lt;!DOCTYPE *************"&gt;<br /><br /> &lt;OrdDesc&gt;<br /><br />  &lt;ord&gt;22&lt;/wh&gt;<br /><br />  &lt;ord_name&gt;Ord1&lt;/wh_name&gt;<br /><br />  &lt;ord_add1&gt;Park Avenue&lt;/wh_add1&gt;<br /><br />  &lt;ord_add2/&gt;<br /><br />  &lt;ord_city&gt;XYZ&lt;/wh_city&gt;<br /><br />  &lt;county/&gt;<br /><br /> &lt;/OrdDesc&gt;]]&gt;&lt;/messageData&gt;<br /><br /> &lt;/Message&gt;<br /><br />&lt;/Messages&gt;<br /></p><br /><p><br /><br /><br />Now, the Msg type(&lt;type&gt;OrderCreate&lt;/type&gt;) I am referring to is not the part of XSD, it gets generated at the time message is created. That's why I don't see that tag in the payload. Payload shows the elements of XSD. <br /></p><br /><p><br /><br /><br /><br /><br />Please help.<br /></p>

  • How to extract from string

    I know I have done this in CVI before..
    I just can't remember how I did it.. 
    (braindead today???!!!???)
    Here goes:
    Take a string:
    "Mary had a little lamb"
    FindPattern "little"
    resulting string:  ""Mary had a lamb"
    What I have works up to finding the pattern and it's location.
    -sigh-
    I know I'll kick myself because from what I recall, it's a very simple solution... I just can't think of it..
    And I vaguely remember the function name that I used...
    R
    Solved!
    Go to Solution.

    Thanks,
    I should have mentionned that the token in this case is a backspace '\b' character.
    The idea is to remove all backspace characters and the character preceding it.
    R
    Here's a sample of the data:
    [Counting] erozurozefozerczeroberozurozefozerczerobNumber of test Errors: 0

  • How to extract a tagged string using XML in sql server 2014?

    A column stores the string data with tag as below.I have to retrieve the value of ATRB_C1 as val1234 through xml
    Query:
    CREATE TABLE #test (col varchar(500))
    INSERT INTO #test VALUES('< ATRB_C value ="val1" />< ATRB_C1 value ="val234" />')
    SELECT * FROM  #test FOR XML RAW
    Output:
    <row col="&lt; ATRB_C value =&quot;val1&quot; /&gt;&lt; ATRB_C1 value =&quot;val234&quot; /&gt;" />
    Since the format is incorrect, not able to extract using xml.value
    Any help would be appreciated!!

    CREATE TABLE #test (col xml)
    INSERT INTO #test(col) VALUES('<ATRB_C value ="val1"/><ATRB_C1 value ="val234" />')
    SELECT * FROM #test
    Select Col1.value('(@value)[1]','varchar(20)') as [tab1_col1],col2.value('(@value)[1]','varchar(20)') as [tab2_col2]
    from #test cross apply col.nodes('/ATRB_C') as tab1(col1)
    cross apply col.nodes('/ATRB_C1') as tab2(col2)
    drop table #test
    Hope it Helps!!

  • How to extract from dll

    I have created a dll file and i have stored an image file in it. I want to extract it i mean i want to use it in my program now what should i do to extract that image file from dll.

    I have created a dll file and i have stored an image file in it. Why?
    I want to extract it i mean i want to use
    it in my program now what should i do to extract that
    image file from dll.How would you normally extract an imagine from a dll. If you don't know, I suggest you not put it in the dll.

  • How to extract a sub string in SQL

    Hi,
    I have two columns "Project Name" and "Flag". 
    Now i want to find out all the project names which contain a particular substring in it, like say - "SRM" and update the "Flag" column to value 1 for all those projects.
    Can someone please help me with this. I'm not understanding how to do this in SQL.
    Many thanks.

    You can use CHARINDEX to achieve this, such as:
    Sample code:
    UPDATE YourTableName
    SET Flag = 1
    WHERE CHARINDEX('SRM', ProjectName) > 0
    Here CHARINDEX will check for string SRM in your Column & updates the rows that returns non-zero value wherever it finds
    I agree that this is one of the solution but would like to make few points here
    Charindex will always do a table scan however LIKE operator may or may not use index which can be critical performance issue when dealing with large data set.
    CHARINDEX has a limit of 8000 bytes [if I am not wrong] 
    It will do implicit data conversion to Unicode if any of the expression is Unicode.
    You can enhance your answer by using PATINDEX also for future users :) 
    My opinion:
    > Charindex will always do a table scan however LIKE operator may or may not use index whichcan
    be critical performance issue when dealing with large data set.
    I feel in this case, Like operator will also do scan for the fact that the position for value SRM is not known, it is definitely
    not beginning with SRM so I could use SRM%, the access predicate is NOT correctly aligned
    Good Luck! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue

  • How to extract from XMLType

    hi
    I have XMLType field in DB. I must select data from this field but I am getting an error.
              OracleCallableStatement st = (OracleCallableStatement)conn.prepareCall (xmlQuery);
                    ResultSet res = st.executeQuery();       
                XMLType  xmltype =null;
                OracleResultSet rs = (OracleResultSet) st.executeQuery(xmlQuery);
                while(rs.next()){
                                            xmltype =(XMLType) rs.getObject("candidate_details");
                            xmltype.extract("/name/text()","/employee").getStringVal();
                           I am getting the following exception:
    java.sql.SQLException
         at oracle.xdb.XMLType.extract(XMLType.java:1427)
         at samplexmltype.XMLTypeForm.btnRead_actionPerformed(XMLTypeForm.java:494)
         at samplexmltype.XMLTypeForm.mav$btnRead_actionPerformed(XMLTypeForm.java)

    If retval contains the whole response including envelope, then obviously it doesn't start at "TICKETCreateRespMsg". You have to use the full path, or a descendant axis, but the former is preferred.
    Be aware of namespaces too, that's a common gotcha with XML.
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2 
      3    retval xmltype := xmltype('<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      4  <env:Header/>
      5  <env:Body>
      6  <TICKETCreateRespMsg xmlns="http://www.testurl.com/webservices/">
      7  <body xmlns="">
      8  <CreateTicket>
      9  <TICKET_NO>A-32758628</TICKET_NO>
    10  <SUMMARY>Test1</SUMMARY>
    11  <ERROR_MSG>Test2</ERROR_MSG>
    12  </CreateTicket>
    13  </body>
    14  </TICKETCreateRespMsg>
    15  </env:Body>
    16  </env:Envelope>');
    17 
    18    v_ticket_no varchar2(30);
    19    v_summary   varchar2(30);
    20    v_error_msg varchar2(30);
    21 
    22    v_ns_map    varchar2(200) := 'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/", xmlns:ns1="http://www.testurl.com/webservices/"';
    23    v_xpath     varchar2(200) := '/env:Envelope/env:Body/ns1:TICKETCreateRespMsg/body/CreateTicket';
    24 
    25 
    26  BEGIN
    27 
    28   SELECT extractValue(retval, v_xpath || '/TICKET_NO', v_ns_map)
    29        , extractValue(retval, v_xpath || '/SUMMARY', v_ns_map)
    30        , extractValue(retval, v_xpath || '/ERROR_MSG', v_ns_map)
    31   INTO v_ticket_no, v_summary, v_error_msg
    32   FROM dual;
    33 
    34   dbms_output.put_line('TICKET_NO = '||v_ticket_no);
    35   dbms_output.put_line('SUMMARY = '||v_summary);
    36   dbms_output.put_line('ERROR_MSG = '||v_error_msg);
    37 
    38  END;
    39  /
    TICKET_NO = A-32758628
    SUMMARY = Test1
    ERROR_MSG = Test2
    PL/SQL procedure successfully completedEdited by: odie_63 on 17 avr. 2012 13:07

  • How to extract from the exception the reason for the failure

    I have a method that executes an sql update and fails.
    The description of the failure is:
    com.ibm.websphere.ce.cm.DuplicateKeyException: One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "XXX" from having duplicate rows for those columns.
    I didn't find a way of extracting the type of the exception (if there's one).
    I want to be able to assess the exception and to return a specific error message with
    the specific error explained.
    thanks
    Itamar

    One can alway catch the exceptions (java.sql.SQLException) and call its getErrorCode() method,
    but getMessage or getLocalizedMessage are fine also.
    In your case you have primary fields or indexes that require uniqueness of some fields across records.
    For instance if you have a composed primary key id+language and forget to INSERT the language.
    Off course you find the spot in the code by:
    try {
    } catch (....Exception e) {
        e.printStackTrace();
    }Another preventive way is to use PreparedStatements.

  • How to extract from YonYuu(u7528u53CB) U8 to BW

    Hi Chinese friends,
    I am now engaged in global DWH (BW) project in which data are gathered from branches in the world. One of the branches uses YonYuu(用友) as their system.
    what is the best way to extract data from YonYuu?
    it uses general DB like oracle, mssql so that I guess it is possible to extract directly from the DB. but I am not sure if it is practically very difficult becuase the modeling of yonyuu(ERP-U8) is too difficult.
    The data sources to be extracted is GL (hopefully like EC-PCA in SAP), order/back order, stock, purchase..
    I guess it is very general case to extract data from YonYuu ERP-U8 in China. So I hope if you share your experience in this case.
    Kind regards,
    Makoon

    If it uses general DBs like Oracle and MSS, then you should be able to connect via DB Connect.  If the data model is relational and you need to gather information from many tables, it may make sense to do some modeling on the source database.  For example, you can join tables via views and create the datasource from the view instead of the tables directly.  In any case, most of the time you have to wrap table in a view due to table/field name restrictions when using DB Connect.
    Regards,
    Mark

  • Variation of NthLargest - how to extract from a different field

    Relative beginner with Crystal and 1st post here - please excuse if answer obvious:
    I have 2 tables, one with static data describing contractors, the other with a table of rate history. So multiple rows per user, each with a  start date and the corresponding rate.
    I can extract the whole history easily enough but if I want to just show the most recent rate I have a problem:
    For the most recent start date I can create a field and use the formula NthLargest (1, {rates.startdate} )
    But for the corresponding rate, what do I do?
    Mike

    Group your data by contractor and sort start date descending.
    Place all your detail records in group footer and suppress details and group header
    Ian

  • 2LIS_05_Q0TASK, or how to extract from a new table

    Hi All,
    I would like to enhance the Quality Management (in Lo Cockpit) extractors with own data. I have standard table appends and an own table which represent a sublevel of the task table QMSM. The appends are ok, I can enhance the standard extractors. But how can I use my new table in the BI?
    The key of the new table is this:
    MANDT
    QMNUM
    MANUM
    OUTCM  (char10)
    CODE    (char10)
    Please help.

    Hello Laszlo,
    If I would have understood your question,
    Once you are done with the datasource enhancement you have to replicate the same into BW side and you have to map the new fields to Comm Stru and finally your data target (InfoCube / ODS)
    Thanks
    Chandran

Maybe you are looking for

  • Report Conversion Tool  error

    Hi exports iam using software 3.1 Iam facing below issue ,while  converting deski to webi reports Note : All my servers are up .. Is i need to enable any options in servers Thanks, Raghunath

  • Is there a limit to the size of a formatted xlsx spreadsheet created by ColdFusion?

    I'm using cfscript to create a (fairly) large xlsx spreadsheet.  As I was developing the script and the spreadsheet grew in size, I started getting the following error when attempting to open the spreadsheet: I narrowed down the problem to my use of

  • OBJECTS_OBJREF_NOT_ASSIGNED Dump while Installing Process Chain

    Hi Gurus,              I got OBJECTS_OBJREF_NOT_ASSIGNED dump while installing Business Content process chian "0TCT_C2_INIT_P01". Also 6 info packages were not delivered in business content for the above chian. Any Help. Regards, Anil

  • Can't open more than 4 tabs simultaneously

    On Yosemite it seems it's impossible to open more than 4 tabs simultaneously in any browser. Perhaps many won't see this as an issue but it's causing serious headaches when attempting to use various workflows. Anyone know if this is a known bug and i

  • ODBC and OCI not working with OBIEE 11g Client on 64 bit machine

    Hi, I have Installed OBIEE 11g client (Admin tool) on Windows XP Professional 64 bit machine.. I have Installed 11g database on the same machine but while importing Metadata using admin tool. getting "Connection has failed" error message... Can someo