boycoder
asked on
cutting things out in memo1
Hi, when i paste the following code in a tmemo i want it to filter out the following into 2 edit boxes..
code Is in the code section
130510677665 into tranid.text
523726777666 into itemnum.text
Now the only things that change is them above.. everything else is the same.. so anything after 3D on the 3rd line and before _ add to the itemnum.txt
and anything from 3rdline _ to % put in tranid.txt
thanks..
code Is in the code section
130510677665 into tranid.text
523726777666 into itemnum.text
Now the only things that change is them above.. everything else is the same.. so anything after 3D on the 3rd line and before _ add to the itemnum.txt
and anything from 3rdline _ to % put in tranid.txt
thanks..
http://rover.ebay.com/rover/0/e12011.m354.l1663/7?euid=8717a842e07c4a1a9409b7aea48106bb&loc=http%3A%2F%
2Fpayments.ebay.co.uk%2Fws%2FeBayISAPI.dll%3FAddTrackingNumber%26flow%3Dmyebay%26LineID%
3D130510624444_523726338888%26ssPageName%3DADME%3AL%3AEOISSA%3AGB%3A1663
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
function GiveAnAppropriateNameToThi sFunction( wholeText : String; var trainId : String; var itemNum : String) : Boolean;
var
__Ofset : Integer;
sigPerPos : Integer;
sigUndPos : Integer;
begin
__Ofset := 196;
sigPerPos := PosEx('%', wholeText, __Ofset);
sigUndPos := PosEx('_', wholeText, __Ofset);
if (sigPerPos > __Ofset) and (sigUndPos > __Ofset) and (sigPerPos > sigUndPos) then
begin
trainId := Copy(wholeText, __Ofset, sigUndPos - __Ofset);
itemNum := Copy(wholeText, sigUndPos + 1, sigPerPos - sigUndPos - 1);
Result := True;
end
else
begin
Result := False;
end;
end;
var
__Ofset : Integer;
sigPerPos : Integer;
sigUndPos : Integer;
begin
__Ofset := 196;
sigPerPos := PosEx('%', wholeText, __Ofset);
sigUndPos := PosEx('_', wholeText, __Ofset);
if (sigPerPos > __Ofset) and (sigUndPos > __Ofset) and (sigPerPos > sigUndPos) then
begin
trainId := Copy(wholeText, __Ofset, sigUndPos - __Ofset);
itemNum := Copy(wholeText, sigUndPos + 1, sigPerPos - sigUndPos - 1);
Result := True;
end
else
begin
Result := False;
end;
end;
ASKER
OUTSTANDING...!
Quote from you
{
Now the only things that change is them above.. everything else is the same..
}
If Everything else is the same, why don't just count the karakters in the full text...
196 to 207
209 to 220