Split string into its number and alphabetic​al components

I have a string constant "There are 100 pens and 200 pencils in the box".i want to split it into two parts one consisting of array of numbers i.e. 100 and 200,while the second part should display "There are pens and pencils in the box".
How should i proceed?

That looks like homework.
What have you tried so far and where did you get stuck?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Divide 16-bit Word into its HI and LO Bytes, then Convert to ASCII????

    Hello,
    I am trying to do the mentioned action:
    Divide 16-bit Word into its HI and LO Bytes, then Convert to ASCII
    I downloaded this .zip file and got the .lks and .l4t files.. I do not know what these files are?  Where can I just find a VI for what I want to do?
    If anyone has one, let me know!
    Thanks,
    Danny
    Solved!
    Go to Solution.

    Dennis_Knutson wrote:
    Use the Split Number function on the Numeric>Data Manipulation palette. Then do a Type Cast (same palette).
    johnsold wrote:
    Danny,
    Look at the Data Manipulation and Conversion sections of the Numeric Palette. Split Number and Byte Array to String are your friends.
    Type Cast Man is worried about carpal tunnel syndrome from dropping too many primitives.

  • UCCX: unable to convert string into a number

    Hi all,
    I used the Get Digit String to pull a 4 digital numbers (stored as variable sYear) from a caller, this number is obviously stored as a string. Then i used 'set iYear=sYear' to conver this string to an integer.
    I debuged the script, when I entered number of year without following #, it worked fine. If I entered number of year and followed by #, i got the message 'unable to conver string into a number'. Can someone help me with that?
    Thanks a lot.

    Hi Reena,
    The UCCX version is 10.5.1.
    I found the problem. It works after i changed input length to 5.  'The terminating key overrides the Maximum Input Length to terminate input'.
    Thanks.

  • Not able to convert string attribute to number and date please help me out

    not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out

    Hi,
    You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
    regards,
    Nick

  • Split String into two

    HI,
    How to Split String into two parts at delimiter

    HI,
    REPORT ZSTRING.
    DATA: LENGTH TYPE I,    
          REMAINING_LENGTH TYPE I ,   
          NEXT_POINTER TYPE I    ,   
          FIRST_HALF(20)  TYPE C ,    
          SECOND_HALF(20) TYPE C ,    
          TEMP TYPE I .
    PARAMETER: WORD(35) TYPE C . "INPUT WORD
    START-OF-SELECTION.
    LENGTH = STRLEN( WORD ).      "Length of the input String
    SEARCH WORD FOR '/'.
        IF SY-SUBRC = 0 .  
          IF SY-FDPOS > 0.   
          MOVE WORD+0(SY-FDPOS) TO FIRST_HALF.  
          ENDIF.  
       TEMP = SY-FDPOS + 1. 
       IF TEMP <> LENGTH.    
       NEXT_POINTER = SY-FDPOS + 1.    
       REMAINING_LENGTH = ( LENGTH - SY-FDPOS ) - 1.    
       MOVE WORD+NEXT_POINTER(REMAINING_LENGTH) TO SECOND_HALF.  
       ENDIF.
    ENDIF.
    WRITE:/'Input String:', WORD .
    WRITE:/'First  Half:', FIRST_HALF.
    WRITE:/'Second Half:', SECOND_HALF.
    *-- End of Program
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Split string into two based on end of word and max length

    I have the following procedure, which is passed a comma separated string as it input, and it has to split it into two, and the split has to occur at the end of a word, and the first split part can't be more than 15 in length.
    Is there an more efficient way of achieving this? I have a loop in my main code that calls this procedure and in effect a nested loop has been created here.
    e.g. Hello, everyone, welcome, to, split, string' would be split into 'Hello' and 'everyone, welcome, to, split, string'
    create or replace procedure split_str
                   (pi_str  in  varchar2,
                    po_str1 out nocopy varchar2,
                    po_str2 out nocopy varchar2) is
      i number;
    begin
      if (len(pi_str) <= 15) then
        po_str1 := pi_str;
        po_str2 := NULL;
      else
        i := 1;
        loop
          exit when len(SUBSTR(pi_str, 1 ,INSTR(pi_str, ',', 1, i)-1)) > 15;
          po_str1 := SUBSTR(pi_str, 1 ,INSTR(pi_str, ',', 1, i)-1);
          po_str2 := SUBSTR(pi_str, INSTR(pi_str, ',', 1, i)+2);
          i := i+1;
        end loop;
      end if;
    end split_str; 

    You want to find the last space character before the 15th character.
    x := INSTR ( SUBSTR ( pi_str, 1, 15) , ' ' , -1)Then the first string is SUBSTR(pi_str,1,x) and the second string is SUBSTR(pi_str,x+1)

  • How to split strings into columns

    Hi guys,
    I have a select like this:
    select 'testing1'||'.'||'testing2'||'.'||'testing3' from dualwhich gives me an output like this:
    testing1.testing2.testing3How can I split this into 3 columns in SQL PLUS?
    Thank you in advance

    user643734 wrote:
    Thank you guys for all your help.
    Hi,
    I tried to resolve your problem using somme functions...
    I know is a long, long story but it works.
    Regards,
    Ion--create table_pivot
    CREATE TABLE pivot_table(id VARCHAR2(1) primary key, all_concat VARCHAR2(1810));
    --add data
    insert into pivot_table (id, all_concat) values('x','12345.2829303132.234234.234234.234234');
    insert into pivot_table (id, all_concat) values('y','67890.2324252627.234234.234234.234234.332545');
    insert into pivot_table (id, all_concat) values('z','11121314.12345.234234.234234.234234.23432.32453245.345435.345435');
    insert into pivot_table (id, all_concat) values('a','151617.67890.234234.234234');
    insert into pivot_table (id, all_concat) values('b','1819202122.1112131415.234234.234234.234234.345435');
    insert into pivot_table (id, all_concat) values('c','2324252627');
    insert into pivot_table (id, all_concat) values('h','2829303132.234234.234234.234234.23432.32453245.345435.345435.4325435.345');
    insert into pivot_table (id, all_concat) values('r','');
    set termout off
    --procedures and functions to compile
    --1. Main function to format strings
    create or replace function fgetformatstring
    (v_max_rows numeric, v_crt_row varchar2, v_table_source varchar2, v_save_to_table varchar2, v_option numeric)
    return varchar2
    is
    v_crt_char      numeric:=0;
    v_pos_char      numeric:=1;
    v_count      numeric:=0;
    v_string_out varchar2(500);
    v_str_paded     varchar2(10):=',null';
    v_length_pad     numeric;
    v_diff_pad numeric;
    l_crt_row varchar2(1800);
    v_char char:=',';
    v_delimiter char:='.';
    l_save_to_table varchar2(1000);
    l_max_rows     numeric;
    begin
    l_crt_row:=replace(v_crt_row,'.' ,',');
    l_save_to_table:=v_save_to_table;
    l_max_rows:=v_max_rows;
    if v_option=0 then     --get the ',null' to paded in pivot_table     
    loop
              v_pos_char:=v_crt_char;
              v_crt_char:=instr(v_crt_row,v_char, v_crt_char+1);
              v_count:=v_count+1;
    exit when v_crt_char=0 or v_count=1000;
         end loop;
         v_string_out:=' ';
         v_count:=v_count-1;
         v_diff_pad :=l_max_rows-1-v_count;
    if v_diff_pad >0 then                    --nothing to add
         v_length_pad:=length(v_str_paded);-- (+v_char)
         v_length_pad:=v_diff_pad*v_length_pad;
         v_length_pad:=v_length_pad+1;
         v_string_out:=rpad(v_string_out,v_length_pad,v_str_paded);
    end if;
    end if;
    if v_option=1 then     --get definition of v_save_to_table
         v_count:=1;
         v_string_out:=' ';
         loop
    exit when v_count=l_max_rows+1 or v_count>=1000;
    v_length_pad:=length(v_string_out||'col'||to_char(v_count)||',');
              v_string_out:=rpad(v_string_out,v_length_pad,'col'||to_char(v_count)||',');
              v_count:=v_count+1;
         end loop;
    v_string_out:=trim(v_char from v_string_out);
              --v_string_out:='id,'||v_string_out;
              v_string_out:=v_string_out;
    end if;
    if v_option=2 then     --get position of last comma  
    loop
              v_pos_char:=v_crt_char;
              v_crt_char:=instr(v_crt_row,v_char, v_crt_char+1);
              v_count:=v_count+1;
    exit when v_crt_char=0 or v_count=1000;
         end loop;
         v_string_out:=substr(v_crt_row,1,v_pos_char-1);
    end if;
    if v_option=3 then     --get numbers of delimiters(.)
    loop
              v_pos_char:=v_crt_char;
              v_crt_char:=instr(v_crt_row,v_delimiter, v_crt_char+1);
    --dbms_output.put_line( 'Rows: ' ||v_crt_row|| ' iteration: '||v_count);
              v_count:=v_count+1;
    exit when v_crt_char=0 or v_count=1000;
         end loop;
         v_count:=v_count;
         v_string_out:=to_char(v_count);
    end if;
    if v_option=4 then     --get sql command to create v_save_to_table
         v_count:=1;
         v_string_out:=' ';
         loop
    exit when v_count=l_max_rows+1 or v_count>=1000;
    v_length_pad:=length(v_string_out||'col'||to_char(v_count)||' varchar2(40), ');
              v_string_out:=rpad(v_string_out,v_length_pad,'col'||to_char(v_count)||' varchar2(40), ');
              v_count:=v_count+1;
         end loop;
    v_string_out:=trim(' ' from v_string_out);
              v_string_out:=trim(v_char from v_string_out);
              v_string_out:='create table '|| l_save_to_table ||'('||v_string_out||')';
    end if;
    if v_option=5 then     --get numbers of delimiters(,) 
    loop
              v_pos_char:=v_crt_char;
              v_crt_char:=instr(v_crt_row,',', v_crt_char+1);
              v_count:=v_count+1;
    exit when v_crt_char=0 or v_count=1000;
         end loop;
         v_count:=v_count-1;
         v_string_out:=to_char(v_count);
    end if;
    dbms_output.put_line( 'string: ' ||v_string_out|| ' option: '||v_option);
    return v_string_out;
    end;
    --2.get max items
    create or replace function fgetmaxitems
    --get the max number of items founded in the pivot_table.all_concat
    --before change the points with comma
    return numeric
    is
    v_max                numeric:=0;
    v_field               pivot_table.all_concat%type;
    v_crt_max numeric:=0;
    v_crt_row     varchar(1000);
    cursor c1 is
    select all_concat from pivot_table;
    begin
    v_crt_max:=0;
    v_max:=0;
    open c1;
    loop
    fetch c1 into v_field;
    exit when c1%notfound;
    v_crt_row:=v_field;
    v_crt_max:=fgetformatstring(0,v_crt_row,'pivot_table','',3);
    if v_crt_max>v_max then
         v_max:=v_crt_max;
    end if;
    end loop;
    close c1;
    return v_max;
    end;
    --3. insert the rows in table_dest
    create or replace procedure pinsertrow
    v_max_rows numeric,
    v_all_concat varchar2,
    v_source_table_name varchar2,
    v_save_to_tablename varchar2
    is
    v_sql_string      varchar2(1000);
    l_all_concat     varchar2(1500);
    begin
    l_all_concat:=replace(v_all_concat,'.' ,',');
    v_sql_string:='('||l_all_concat||')';
    v_sql_string:=' insert into ' ||v_save_to_tablename
    ||' (' ||fgetformatstring(v_max_rows,l_all_concat,v_source_table_name,v_save_to_tablename,1)||')'||
    ' values'||v_sql_string ;
    execute immediate v_sql_string;
    end;
    --4.procedure to create dinamically <table_dest>
    create or replace procedure pcreatesavetable
    (v_table_source varchar2, v_save_to_table varchar2)
    is
    v_sql_string      varchar2(1000);
    already_exists exception;
    pragma exception_init(already_exists,-955);
    v_max numeric;
    begin
    --clear empty values;
    v_sql_string:='delete from ' ||v_table_source|| ' where length(all_concat)=0 or (all_concat) is null';
    execute immediate v_sql_string;
    v_sql_string:='';
    v_max:=fgetmaxitems;
         --create new table
         v_sql_string:=fgetformatstring(v_max,'all_concat', v_table_source,v_save_to_table,4);
    dbms_output.put_line( 'sql create : '|| v_sql_string);
    execute immediate v_sql_string;
    exception
         when already_exists then
    --delete old table
         v_sql_string:='drop table ' ||v_save_to_table;
         execute immediate v_sql_string;
         --create new table
         v_sql_string:=fgetformatstring(v_max,'all_concat', v_table_source,v_save_to_table,4);
    dbms_output.put_line( 'sql recreate final_table : '|| v_sql_string);
    execute immediate v_sql_string;
    end;
    --5.main procedure
    create or replace procedure pmainproc(v_save_to_table varchar2)
    is
    v_key_pivot      pivot_table.id%type;
    v_column_pivot     pivot_table.all_concat%type;
    v_max numeric;
    v_crt_row          varchar2(1600);
    cursor c2 is select y.id , y.all_concat
         from pivot_table y
    ;     --cursor upon pivot_table 
    begin
    v_max:=fgetmaxitems;
    if v_max <> 0 then
    --clear empty values;
    delete from pivot_table where length(all_concat)=0 or (all_concat) is null;
    --change all points with comma
    update
    (select x.id, x.all_concat from pivot_table x, pivot_table y where x.id=y.id) b
    set b.all_concat=replace(b.all_concat,'.', ',');
    -- padd the all_concat with ',null'
    update
    (select x.id, x.all_concat from pivot_table x, pivot_table y where x.id=y.id and
    fgetformatstring(v_max,x.all_concat,'pivot_table',v_save_to_table,5) <> v_max
    ) b
    set b.all_concat=b.all_concat || fgetformatstring(v_max,b.all_concat,'pivot_table',v_save_to_table,0);
    --remove last
    update pivot_table
    set all_concat= fgetformatstring(v_max,all_concat,'pivot_table',v_save_to_table,2)
    where fgetformatstring(v_max,all_concat,'pivot_table',v_save_to_table,5) = v_max;
    open c2;
    loop
    fetch c2 into      v_key_pivot, v_column_pivot;
    exit when c2%notfound;
    v_crt_row:=v_column_pivot;
    -- insert data in to final_table
    pinsertrow(v_max,v_crt_row,'pivot_table',v_save_to_table);
    end loop;
    close c2;
    end if;
    end;
    --create table_dest
    --the table_dest will be created automatically, so you need admin privilege to run that before compile pcreatesavetable :
    connect / as sysdba or connect system/password
    --grant create table to hr;
    --conne hr/hr;
    exec pcreatesavetable('pivot_table','table_dest');
    --add data to table_dest
    exec pmainproc('table_dest');
    set termout on
    select * from table_dest;
    Table created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    Function created.
    Function created.
    Procedure created.
    Procedure created.
    Procedure created.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10
    12345 2829303132 234234 234234 234234
    67890 2324252627 234234 234234 234234 332545
    11121314 12345 234234 234234 234234 23432 32453245 345435 345435
    151617 67890 234234 234234
    1819202122 1112131415 234234 234234 234234 345435
    2324252627
    2829303132 234234 234234 234234 23432 32453245 345435 345435 4325435 345
    7 rows selected.

  • Splitting event into its own library

    My main iPhoto library is growing to the point where it will barely fit on a DVD.
    I'd like to split out the larger of the two events in this library into its own library.
    I do have iPhoto Library Manager...
    I'd like to know how to do this as I really should get around to making my periodic DVD backups.

    Yeah, I did just that - but as for the actual move, I was momentarily stumped until I realized I just had to click and drag the event in question into the new library.
    Done and done, now am "starting over" by moving all the pics previously tagged with keywords into new events.
    I said it before and I'll say it again - I simply do not know why I was so hesitant to use iPhoto in the first place! It's far better than my old "folder tree" system.
    Thanks for the big hint.
    Message was edited by: Dave Dahle

  • Split string based on number of characters

    Hi,
    I have a simple map where I receive a Streetname out of the source and have to write that streetname to the Address1 element in the destination. The issue is that the destination Address1 element can only contain 100 characters.
    If it has more then 100 characters then I have to split the string into the Address2 element.
    The next question is how I can do it the good way so that the string would be split between spaces and not in the middle of a word. For example:
    Streetname1 Streetname2 Streetname3 Streetname4 Streetname5 Streetname6 Streetname7 Streetname8 Streetname9
    The hundredth character is between t and r in Streetname9. So the cleanest solution would be to place everything in address1 and Streetname9 in address 2.
    How can I achieve this?

    I had faced a similar situation in which output element could only contain 100 characters after that i had to split rest of characters in batch of 100 characters and repeated the element.
    This was achieved by implementing recursion through XSLT. For this I created a template which will return a substring a generate an element with that element. This template will take two parameters-1) Complete string 2) Length (100 in your case).
    check the below article for a sample
    http://www.codeproject.com/Articles/16866/Recursive-XSL-Templates
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Split string into new column

    Hi All,
    Hoping you are able to help.
    I have a table of approx 16 items that I need to split,
    EG:
    CUSTOMER ACCEPTANCE - HAS BEEN DECLINED - DO NOT APPLY TO ACCOUNT
    CUSTOMER ACCEPTANCE -  HAS BEEN ACCEPTED - APPLY TO ACCOUNT
    CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED - RAISED IN PORTAL
    ESCALATION - RAISED - PENDING
    ESCALATION - NOT RAISED - STILL TO BE PROCESSED
    I need to Keep the first two sections, eg CUSTOMER ACCEPTANCE - HAS BEEN DECLINED in one column, and split off the remaining, eg DO NOT APPLY TO ACCOUNT into a new TEMP table to insert as a column into an existing table.
    With little SQL experience, I am having difficulties as they are all of different lengths / criteria etc. Some have 3 hyphens whilst others have 4+
    Is anyone able to help point me in the right direction with this request? I will be greatly appreciated.
    Kind Regards,
    BTMMP

    If you're trying to do this all in a SQL query or stored procedure, then you'll probably get better results on the SQL Server forums. However, if you're working with a PowerShell or VBScript that's doing the work, you're in the right place.
    Here's one example of how you could do what you're describing.  By the way, what do you want to do with the string "CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED - RAISED IN PORTAL"?  Should that be split into "CUSTOMER ACCEPTANCE
    - PENDING DECLINE" and "ESCALATION REQUIRED - RAISED IN PORTAL", or "CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED" and "RAISED IN PORTAL"?
    (In other words, should the script only split off whatever's after the final hyphen, or should it grab the first two pieces of text and split off everything else?)
    Here's an example in PowerShell which assumes that you want to separate out all text after the final hyphen in a string.  It uses a regular expression, though you could accomplish the same thing with Split, Join and Trim operations, if you prefer.
    $string = 'CUSTOMER ACCEPTANCE - HAS BEEN ACCEPTED - APPLY TO ACCOUNT'
    if ($string -match '(.*?)\s*-\s*([^-]*)$')
    $split = $matches[1], $matches[2]
    else
    $split = $string, ''
    Write-Host "Original String: $string"
    Write-Host "First Text : $($split[0])"
    Write-Host "Second Text : $($split[1])"

  • How can I put a stl::vector string into the DB and then get it out?

    Hello,
    As the title, here's a test case with problems,but anyway you can still run it. ( VC6/XP-32/BDB 4.7 )
    I know this may be wrong,and I'd like to know how can I do this.
    Can someone help me please? I would appreciate it very much.
    ************ Copy,Compile and Run ***************
    #include <iostream>
    #include <vector>
    #include "db_cxx.h"
    int main()
         std::string dbName("database.db");
         u_int32_t db_flags=DB_CREATE;
         Db* db=NULL;
         // Prepare key(int)/data(vector<string>) pair.
         int int_key=2;
         std::vector<std::string> rec_data;
         rec_data.push_back("apple");
         rec_data.push_back("Bob");
         rec_data.push_back("Me");
         // Prepare Dbt for receiving.
         std::vector<std::string> rec_readData;
         Dbt readData;
         readData.set_data(&rec_readData);
         readData.set_ulen(sizeof(rec_readData));
         readData.set_flags(DB_DBT_USERMEM);
         try
              // Open database.
              db = new Db(NULL,0);
              db->open(NULL,dbName.c_str(),NULL,DB_BTREE,db_flags,0);
              // Put
              int ret;
              if(ret=db->put(NULL,new Dbt(&int_key,sizeof(int_key)),new Dbt(&rec_data,sizeof(rec_data)),DB_NOOVERWRITE)==0)
                   std::cout<<"put successful!"<<std::endl;
              else { db->err(ret,"Db->put"); }
              // Get
              if(ret=db->get(NULL,new Dbt(&int_key,sizeof(int_key)),&readData,0)==0)
                   std::cout<<"get successful!"<<std::endl;
              else { db->err(ret,"Db->get"); }
         catch(DbException &e)
              std::cerr<<"Error: ";
              std::cerr<<e.what()<<std::endl;
         // Close the database
         try
              if(db!=NULL)
                   db->close(0);
         catch(DbException &e)
              std::cerr<<"Error closing database: ";
              std::cerr<<e.what()<<std::endl;
         // Display the results.
         // Index out of bounds. <-----
         std::cout << rec_readData[0].c_str();
         std::cout << rec_readData[1].c_str();
         std::cout << rec_readData[2].c_str();
         system("pause");
         // Press any key to go wrong. :(
         return 0;
    Regards,
    legendsino

    You need to convert the std::vector<std::string> into a sequence of bytes. For example, if all strings are shorter than 256 characters, you could create a fresh output string, iterator through the vector, and for each element, append the string length to the output string, followed by the string contents.
    Note that ordering in the database will be different from lexicographic order, and you have to keep that in mind when performing range queries.

  • Issue with splitting string into multiple lines

    Hi Experts,
    I have a long string s. I want to split this string into several lines each having 72 characters. For this I have done following programming:
         String s = "For the first time it includes a supplementary report attempting to determine if extreme weather
    events can be linked to human-induced climate change. The research team, including members
    of the UK Met Office, identified recent episodes of extreme weather then used a computer to
    estimate the likelihood of the episode happening in a world without increased CO2." ;
         s = s.replaceAll("[\r\n]+", " ");
         char[] sAr = s.toCharArray();
         AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
         int start = 0; // start with
         int i = 72 ;
    //     for (int i = 71; i < sAr.length; i++) {
    while (i < sAr.length) {
    //     {     if (sAr[i] == ' ')
                   Bapitrtext Recepits7 = new Bapitrtext();
                   Recepits7.setTextid("TEXT");
                   Recepits7.setTextline(s.substring(start, i).replaceAll("[\r\n]+", ""));
                   RecepitsList7.add(Recepits7);
                   start = i+1;
                   i += 72;
         input.setText(RecepitsList7);
    The output of program is as below:
    For the first time it includes a supplementary report attempting to dete
    mine if extreme weather events can be linked to human-induced climate
    hange. The research team, including members of the UK Met Office, iden
    ified recent episodes of extreme weather then used a computer to estim
    te the likelihood of the episode happening in a world without increased
    Here as we can see last characters are getting deleted by program. For example in first line
    determine 'r' is missing in extreme right.
    In 3rd line c is missing in extreme left (word change is needed. Program
    prints hange.
    Also in 3rd line extreme right 't' is missing
    Also in 4th line extreme right 'a' is missing
    Also the last line is not being printed. In last line "CO2." " should appear.
    There are two issues:
    1. Why last word of each sentence is not being printed?
    2. Why last sentence is not being printed?
    I am struggling since last 2 days. Please help. I made all changes like replacing 72 by 71 etc.
    By making such changes, I am able to print first line correctly. However under all cases
    last character of 2nd line onward is not getting displayed.
    Also last line is not getting displayed. I did every thing like using while instead of for loop etc.
    Kindly help.
    Regards,
    Gary
    Edited by: 945655 on Jul 10, 2012 11:39 PM

    String s = wdContext.currentContextElement().getExpense_Text();
         s = s.replaceAll("[\r\n]+", " ");
         char[] sAr = s.toCharArray();
         AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
         int start = 0; // start with
         int i = 72;
    while (i < sAr.length) {
                   Bapitrtext Recepits7 = new Bapitrtext();
                   Recepits7.setTextid("TEXT");
                   System.out.println(s.substring(start, i));
                   RecepitsList7.add(Recepits7);
                   start = i+1;
                   i += 72;
         input.setText(RecepitsList7);
    Edited by: 945655 on Jul 11, 2012 2:25 AM

  • Using scan from string to convert a string into a number

    I wanted to use scan from string to change a string into a decimal number, but when the string is, for example, 9.14123E-2 it just returns 10. How can I get it to return .00914 or 9.14E-2(as a number not a string). Would there be something easier than scan from string? I'm using labview 5.1. Thank you!

    Hello,
    May be you can checkout the attached example.
    Perkash Mohan Lal
    Institute of Semiconductor Technology
    Technical University Braunschweig
    Attachments:
    string_conversion_1.vi ‏44 KB

  • Split string into itab

    Hello,
    I am trying to split a string into an internal table with:
    split content at '##' into table it_content
    but as the expected 6 line I only get 1 line into the table with the complete string.
    Any ideas?
    regards
    stefan

    Hi,
    You need to write the Program like below
    DAta: DEL(3) VALUE '***'.
    SPLIT content AT DEL INTO TABLE <itab>.
    The system adds a new line to the internal table <itab> for each part of the string.
    Regards
    Sudheer

  • Split column into multiple text and number columns

    I'm trying to figure out how to split this column into multiple columns with power query. One column for the company name/person name, one for the address, one for the zip.  Some of the addresses have a three or four digit code before the address, which
    I would like in its own column too.  It's the 170 on the lastname, firstname line.  Does anyone have any pointers on this? I'm familiar with PQ advanced editor, but struggling with this one.  
    COMPANY INC. 195 MAIN ST MYCITY ST 12345
    LASTNAME, FIRSTNAME 170 477 ANY STREET CIRCLE  MYCITY ST 12345
    Thanks for your help!

    HI Gil,
    We have column with more than one numbers separated by space or comma or semicolon.
    We need to add the row for each number by keeping all other column value same.
    Here is a original table
    Col1
    Col2
    Col3
    A
    B
    11 22,33 44; 55
    C
    D
    10    20
    and expected output should be
    Col1
    Col2
    Col3
    A
    B
    11
    A
    B
    22
    A
    B
    33
    A
    B
    44
    A
    B
    55
    C
    D
    10
    C
    D
    20
    Please let us know the best way to solve this...

Maybe you are looking for

  • InDesign Place Multiple Graphics in a grid

    I really like new feature of placing multiple graphics all at once into a grid, simply by holding the Command+Shift. This seems to be limited to only working when multiple files have been chosen in the Place dialog and loaded into the Place cursor. I

  • How do I open a word doc using Pages?

    I am new to Macs and I have no idea how to open a word document in Pages. I really do not want to keep Windows or Word on the mac so if there is any way to keep Windows off my computer please help.

  • File to Idoc .If order is their need to send mail

    Hi All, I have scenario like this. Sending file (order) to SAP -IDoc I using RFC lookup .There is funtion module which has been developed in SAP R/3 it contains 5 import parameters and return SUBRC. If the result is  subrc = 4 This is the normal situ

  • Airport Express Very, Very, Slow

    I have an iMac with a Airport Extreme router and an Airport Express being used as a wireless network extender. The Extreme is connected to my Virgin broadband @ 29-30 meg and works fine. However on my next floor up where the Express is , not some 20

  • Flash CS6  broken air iOS test ?

    Hi, i´m currently developing an application for iOS with air iOS 3.9 . 10 minutes ago i was testing and debuging like always. Suddenly my app start "crashing" when i test or debug. i quote "crashing" , because no error is  throw and no simController