How to extract string part by part !!!

I have a variable like,
var := 'c001,c002,c003';
I want to take c001 c002 and c003 seperately and insert into some table having one column as seperate rows,
Please let me know how to do that.
Thnx for ur response.

For an example see my reply to your other posting at splitting comma demilited file

Similar Messages

  • How to extract local part from email address

    Hello, dear Colleagues.
    Please, help to extract local part from email address.
    Input string: "From: [email protected]"
    Need to get output string between "space" and "@": "C.Norris"
    Thanks.

    Thanks you, mjolinor.
    It works. 
    Could you show me please how to do the same with regular expression?
    Using -replace:
    $InputString = "From: [email protected]"
    $InputString -replace 'From: (.+?)@.+','$1'
    C.Norris
    Using -match:
    $InputString -match 'From: (.+?)@.+' > $null
    $Matches[1]
    C.Norris
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to extract string with delimiter

    Hello all,
    I'm using Oracle 10g and want to extract string with a delimiter.
    For example, i have aaaa;;bbbb;cccc;dddd;eeee;ffff and i want to extract this string into separates strings 'aaaa', ' ', 'bbbb', 'cccc', 'dddd', 'eeee', 'ffff'.
    Thanks a lots for yours help.
    MK.

    I prefer the regular expression method myself...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'aaaa;;bbbb;cccc;dddd;eeee;ffff' as txt from dual)
      2  -- end of sample data
      3  select REGEXP_SUBSTR (txt, '[^;]+', 1, level)
      4  from t
      5* connect by level <= (select length(regexp_replace(txt,'[^;]*'))+1 from t)
    SQL> /
    REGEXP_SUBSTR(TXT,'[^;]+',1,LE
    aaaa
    bbbb
    cccc
    dddd
    eeee
    ffff
    7 rows selected.
    SQL>

  • How to extract a part of a string?

    halo! please provide osme guidance:
    �����������������������������������������������������������������
    in a file, i have these parameters:
    ip_ver=v4 ipadd=111.12.3.5 ip_msk=123.4.5.23 ...
    �����������������������������������������������������������������
    i want to extract the ip_ver and ip_msk parameters
    i have divided the lines into tokens, and assign
    String prop = token;
    i encounter a problem in extracting ip_ver and ip_msk in the following
    if (prop.startsWith ("ip_ver")== ture){
    //...do something...
    else if(prop.startsWith ("ip_msk") == true){
    //..do somehting
    there is nothing extracted out of "ip_msk"
    thank you for your help.

    not sure if this is work but you could try to use the lastIndexOf(String str) method in the string class.
    like:
    String ip_ver=new String("v4 ipadd=111.12.3.5 ip_msk=123.4.5.23");
    int startPoint = ip_ver.lastIndexOf("ip_msk");
    // if ip_msk found then....
    if(ip_msk != -1) {
    String str_ip_msk = ip_ver.substring(startPoint); // get it
    guess it'll depend if ip_ver is a string.

  • How to extract multiple parts of a .rar file

    How would I extract files like this

    Usually you just click on the first one and the different parts take care of themselves.
    Try UnRarX - Mac OS X RAR Extraction Utility

  • How to extract a part of text using utl_file

    hi,
    I have a small requirement which goes as follows. I have a text file which is a resultof the sql query and it contains 16 columns as TAB delimited text . I am using the UTL_FILE package concept to read the data. In general when we use the UTL_FILE.GET_LINE we read the entire line of text. But i need to read the 10th column of the query or the tab delimited text .
    Please advice.
    My query goes something like this:
    declare
    f utl_file.file_type;
    s long;
    c number := 0;
    begin
    f := utl_file.fopen('ABC_EXTRACTS','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into s values (s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;

    prazy the one which you have specified above seems to work fine .but if a word is seperated by the space it is considering as tab (space delimited is considered as tab limited by your query)delimited .
    with T as (
    select 'john sam alfred nobel samuel thomas' col1 from dual)
    select regexp_substr(col1,'[^      ]+',1,4) from t
    here alfred nobel is a single name and is seperated by a space .the above query returns nobel but we need samuel .
    What i mean to say is space delimited should not be taken into consideration when tab delimited is considered(since if 4 is replaced by 5 in the above query we may get samuel) .
    Please advice

  • How Can I extract each part of a string ??

    Dear Sir:
    I have a string like following to connect to Oracle Database:
    JDBC_URL= jdbc:oracle:thin:@localhost:1521:ABChere,
    I have Variables like:
    driverClass="";
    Hostname = "";
    port = "";
    SID="";
    etc
    I try to extract each part from this JDBC_URL,
    then assign them to following variable separately:
    driverClass="jdbc:oracle:thin";
    Hostname = "localhost";
    port = "1521";
    SID="ABC";
    Can some guru help give some good example and show how to do it??
    Thanks and have a nice weekends.

    try using a regular expression (regex).
    here, i am going to try to freeball it:
    // JDBC_URL= jdbc:oracle:thin:@localhost:1521:ABC
    Pattern p = Pattern.compile("(JDBC_URL)(\\s*)(=)(\\s*)(.*?:.*?:.*?)(:)(@)(.*?)(:)(.*?)(:)(.*?)")
    Matcher m = p.matcher(text)
    if(m.matches()) or if(m.lookingAt()){
    String driverclass = m.group(5);
    String hostname = m.group(8);
    ...group(10);
    ...group(12);
    }note that (\\s*) means "any amount of whitespace" and (.*?) means "any amount of any character (reluctantly)".
    i used that because i dont know the constraints on those values. for only numbers you can use (\\d+) etc
    [http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html|http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html]
    also, i put everything into ( ) - which is called a capture group - but that was just to make it clearer. in your final regex you may get
    rid of most of those.

  • How to extract Slide data in 3rd part application from clipboard

    I need to be able to copy/paste or drag/drop from PowerPoint into another application (C# WPF). In my OnDrop method the DragEventArgs Data has these formats:
            [0]    "Preferred DropEffect"    string
            [1]    "InShellDragLoop"    string
            [2]    "PowerPoint 12.0 Internal Slides"    string
            [3]    "ActiveClipBoard"    string
            [4]    "PowerPoint 14.0 Slides Package"    string
            [5]    "Embedded Object"    string
            [6]    "Link Source"    string
            [7]    "Object Descriptor"    string
            [8]    "Link Source Descriptor"    string
            [9]    "PNG"    string
            [10]    "JFIF"    string
            [11]    "GIF"    string
            [12]    "Bitmap"    string
            [13]    "System.Drawing.Bitmap"    string
            [14]    "System.Windows.Media.Imaging.BitmapSource"    string
            [15]    "EnhancedMetafile"    string
            [16]    "System.Drawing.Imaging.Metafile"    string
            [17]    "MetaFilePict"    string
            [18]    "PowerPoint 12.0 Internal Theme"    string
            [19]    "PowerPoint 12.0 Internal Color Scheme"    string
    The "PowerPoint 14.0 Slides Package" is a byte array... can this be converted into Slides?
    If not how would I go about getting high-resolution images + slide text from a drag/drop?
    [Originally posted here: http://answers.microsoft.com/en-us/office/forum/office_2013_release-powerpoint/how-to-extract-slide-data-in-3rd-part-application/a0b5ed64-eb77-49bb-bf44-e0732e23a5eb]

    What I'd like to do:
    Open PowerPoint
    In PPT open a presentation
    In PPT select a slide
    Drag it to my 3rd party WPF application
    In the 3rd party WPF application drop handler get the slide data (text, background image, etc...).
    When I do this I get the DragEventArgs Data (the clipboard data) and it has the 20 supported formats I listed in the 1st post. From these formats #4 seemed like it could have some useful info.
    WPF
    <Window x:Class="PowerPointDropSlide.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" AllowDrop="True" Drop="UIElement_OnDrop" DragOver="UIElement_OnDragOver">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue">
    <TextBlock Text="Drop something here!"/>
    </Grid>
    </Window>
    Handlers:
    public void UIElement_OnDragOver(object sender, DragEventArgs e)
    public void UIElement_OnDrop(object sender, DragEventArgs e)
    string[] supportedFormats = e.Data.GetFormats();
    object pptSlidesPackage = e.Data.GetData("PowerPoint 14.0 Slides Package");

  • Extracting second  part of string

    hi
    i have a string like abcd~12341sdfs
    I have to extract the string after ~ symbol
    Please let me know how ot do it

    Your same question from last week Extracting a part of Strng.

  • How to use the image manipulation palette to extract a part of an image

    How to use the image manipulation palette to extract a part of an image?I have a parent image from which i need to extract a certain sub part.can somebody pls help me on how to use this particular tool?
    Thanks

    Use the above snippet. You might need to convert the Image Type you are using with picture functions. The above snippet will give you good idea on how to achieve what you intend to.
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"

  • How to extract part of a pdf page and save that as a pdf page on its own?

    I need to extract part of a pdf page. I know how to extract full page, but that is not what I want. I need to extract part of it, ideally, using the mouse to select some rectangular area, and export the selected part to either separate pdf page, or to export to  vector graphics such as .svg
    Is there a tool to allow one to do this? Currently I take screen shot of the page, and use other tools to extract the parts I want. thanks.

    thank you. The crop tools helps. But I am still not sure what to do after I select the area I want. I looked at Acrobat Help | Crop PDF pages
    So, after I select the crop tool and select the area. Now what to do?
    If I double click the cropped area, as the help says, it will just delete everything on the page except the cropped area.
    How do I tell it to either export the selected area to .svg, or save the selected area to a separate one page pdf file?  I do not want to modify the original PDF file, I just want to make a copy of the cropped area, either to .svg image, or to separate pdf file, so I can include that in another document.

  • 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?

  • How can I copy part of a larger PDF file and create a smaller one?

    How can I copy part of a larger PDF file and create a smaller one?

    Hi,
    Copy the content of PDF file in Adobe Reader and paset it to MS Word then create PDF file from the Word file.
    This may not work for all PDF files as some PDF files are not created correctly or some content cannot be copied.
    Acrobat XI Pro has features to extract/delete/crop pages in PDF files and you can download it from www.adobe.com(Trial version- 30 days free). Or you can upgrade your subscription to Acrobat Plus and see more information at https://www.acrobat.com/acrobatplus/en/home.html
    Hisami

  • How not to resize part of the stage?

    Hello, I would like to know how to have a part of my website not resize with the browser window.
    You can see what I want to achieve on the website...www.serialcut.com
    They show their work as the page´s background which can be resize with the browser window, but their navigation always stays the same.
    I know how to achieve the resizing effect, but it resizes the whole stage including navigation.
    Any suggestions?
    Thanks, Marcelo.
    PS: I´m using flash CS3/A.S.2

    It seems the protected ComboBoxEditor editor has as it's default editor component a JTextField.
    I tried the following code snippet with a couple of other JComboBox constructers and came to the same result.
    Hope this helps.
    Symploximport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Combo extends JComboBox
       Combo()
          Component c = editor.getEditorComponent();
          System.out.println(c.getClass().getName());
          try{
             JTextField text = (JTextField)c;
          }catch(ClassCastException e)
             {System.out.println("Not a JTextField");}
       public static void main(String[] args)
          new Combo();
    }

  • Extract a part from a txt file

    Hi, I've a simple problem which unfortunately can not solve.
    I have some txt's that I want only to extract a part o them. (The first 100 characters). Here is my code:
    import java.io.*;
    public class ReadSource {
         public static void main(String[] arguments) {
            try {
              FileReader file = new FileReader("1.txt");
              BufferedReader buff = new BufferedReader(file);
               boolean eof = false;
               while (!eof) {
                    String line = buff.readLine();
                    if (line == null)
                        eof = true;
                     else{
                     int start = line.indexOf("something");
                     int end = line.indexOf("something_else");
                     String str2 = line.substring(start, end);
                      System.out.println(str2);
                buff.close();
            } catch (IOException e) {
                System.out.println("Error -- " + e.toString());
    }and the error tha java displays is:
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at ReadSource.main(ReadSource.java:21)
    Exception in thread "main"

    Tim I'm very sorry but is still don't work. It still display the same error.
    Look at my code
    import java.io.*;
    public class ReadSource {
         public static void main(String[] arguments) {
           try {
                   BufferedReader reader = new BufferedReader(new FileReader("1.txt"));
                   BufferedWriter writer = new BufferedWriter(new StringWriter());
                   String line = null;
                   while ((line = reader.readLine()) != null) {
                       writer.write(line);
                       writer.newLine();
                   String content = writer.toString();
                   // Now you have the whole file content into the content String
                   int start = content.indexOf("smth");
                   int end = content.indexOf("smth2");
                   String str2 = content.substring(start,end);
                   System.out.println("start = "+start+", end = "+end);
                   System.out.println(str2);
               reader.close();
         }catch (IOException e) {
                System.out.println("Error -- " + e.toString());
    }It looks very logical, I don't know what happens
    Thank you very much for your help.
    Kostas

Maybe you are looking for

  • Can I run two midi controllers (keyboard  and pad) at the same time?

    ie.....can I play keyboard and use a pad for an effect of some sort - creating two instraments at the same time. I want to play say, piano on one instrament w/ a keyboard and at the same time play a synth effect on a trigger pad with another instrame

  • My iphone wont restore and is stuck

    I updated my itunes which then prompted me to update my iphone software.  This caused my iphone to become stuck.  I have restarted my phone several times, I have removed itunes from my computer and re installed it.  I have tried to restore my phone a

  • Load Order in a mapping

    any one has done a SINGLE MAPPING WITH multiple SOURCE TO multiple target like      source a TO target a      source b TO target b      source c TO target c in an order, which is first a should be feeded, THEN b and so ON... we have load order in Par

  • JCO Server implementation questions

    Hi experts, I want to try to create a JCO Server with the JCO 3 library. I'm kinda lost in all the links I've found since there is still a lot of things from the JCO 2 on the internet and I don't understand everything I'm doing. Please note that ther

  • Workload monitor ST03 giving an Error

    Hi i need to know how do we check the avg dialog response time in ST03, i checked in all the options workload, Datialed analysis, load history i din't get it, but i get an error while pulling the information from workload as" Unknown period type (D)"