#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Parse to Listbox help please


    hi every body excuse me my english isnt good i have a problem with parsing

    <td>link1</td>
    <td>link2</td>
    <td>link3</td>
    <td>link4</td>

    i want to parse and add to listbox

    thanks so much
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    And what have you done so far?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Originally Posted by Luthfi
    And what have you done so far?
    what ? i dont understand

    Function AradanSec( text, ilk, son:widestring ): String;
    begin
    Delete(Text, 1, pos(ilk, Text) + Length(ilk)-1);
    Result := Copy(Text, 1, Pos(Son, Text)-1);
    end;


    in button click

    var
    s : string;
    begin
    s := aradansec(memo1.lines.text, '<td>', '</td>');


    but only link1 is adding to listbox, i want to all link adding
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    355
    Rep Power
    7
    Originally Posted by el_hasibi
    what ? i dont understand

    Function AradanSec( text, ilk, son:widestring ): String;
    begin
    Delete(Text, 1, pos(ilk, Text) + Length(ilk)-1);
    Result := Copy(Text, 1, Pos(Son, Text)-1);
    end;


    in button click

    var
    s : string;
    begin
    s := aradansec(memo1.lines.text, '<td>', '</td>');


    but only link1 is adding to listbox, i want to all link adding
    Probably only need to iterate through each line of you memo control

    Code:
    var
       s : string;
       I: Integer;
    begin
       for I := 0 to Memo1.Lines.Count - 1 do
       begin
          s := aradansec(memo1.lines[I], '<td>', '</td>');
          //Add S to your listbox.
       end;
    end;

IMN logo majestic logo threadwatch logo seochat tools logo