Results 1 to 3 of 3

Thread: [RESOLVED] string Split

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    8

    Resolved [RESOLVED] string Split

    I have the following data in my string

    this is in one line
    5[?3l[?7h Mode: DISPLAY   INSURANCE COMPANY MASTER  01 Date: 10/30/07  Time: 12:19:06  Status Code ------>    Company Code -----> ARC  Insurance Type ---> O (F4)  Carrier Aff ------>      Company Name -----> A.D.M.   Group Name ------->    Address Line 1 ---> P.O. BOX 1470   Address Line 2 --->    City/State/Zip ---> DECATUR   IL (F4) 62525  Country -> US (F4) Telephone --------> 800-447-2302

    This is in the second line
    5[?3l[?7h Mode: DISPLAY   INSURANCE COMPANY MASTER  01 Date: 10/30/07  Time: 12:19:06  Status Code ------>    Company Code -----> A19  Insurance Type ---> O (F4)  Carrier Aff ------>      Company Name -----> AA & C - CA   Group Name ------->    Address Line 1 ---> PO BOX 19570   Address Line 2 --->    City/State/Zip ---> IRVINE   CA (F4) 92623  Country -> US (F4) Telephone --------> 714-253-3738 Extension:    

    output should be as follows


    Code Name Add1 Add2 City State Zip Phon
    ARC A.D.M. P.O. BOX 1470 DECATUR IL 62525 800-447-2302
    A19 AA & C - CA PO BOX 19570 IRVINE CA 92623 714-253-3738


    Any help would be great..

    Thanks

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: string Split

    That is a little bit useless. To derive that information from that sort of data is going to be very hard and possibly going to be quite a process intensive procedure.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    8

    Re: string Split

    Hi Paul actually I figured it out myself
    I first split the string with ">"
    thay used the substring to get the data...

    String[] split = sfile2.Split(char.Parse(">"));
    ICode = s3.Substring(13, 3);

    That worked fine...

    Bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width