wildzero
asked on
Copy some text from a string
I got this text inside a string
Description:</STRONG>somet hing another something
more something<p> and yes more<BR><BR><BR>
What I want to do is copy the text between :</STRONG> and <BR> so I would get
something another something more something and yes more
So I think I need the position of
Description:</STRONG>
Then +1 the position until I get to <BR> then select that text and copy it.
the text between those two points will be different all the time....
Thanks guys!
Description:</STRONG>somet
more something<p> and yes more<BR><BR><BR>
What I want to do is copy the text between :</STRONG> and <BR> so I would get
something another something more something and yes more
So I think I need the position of
Description:</STRONG>
Then +1 the position until I get to <BR> then select that text and copy it.
the text between those two points will be different all the time....
Thanks guys!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks :D
Used a combination of the two!
Used a combination of the two!
function YourExtract(FromThis: String): String;
var
s1: string;
begin
delete(FromThis,1,pos('</S
s1:=copy(FromThis,1,pred(p
while pos('<p>',s1)<>0 do delete(s1,pos('<p>',s1),3)
result:=s1;
end;