T0masz
asked on
data processing split string by another string
Im reading the output from a serial port, it has an event whenever a new line is reached
so the output is buffored per line. the output looks something like
----- somedata some data
some data
some data
some data
------ new data new
new new
new
new
new
ldkslsdjf
the sequence starts with -------, now I want to have a buffor where I oneventdata
it would add to the string I have the new data then phrase it looking for ------ the new sequence if there is one then the the thing would get processed. Now I tried looking for a split function that would allow the delimeter to be another string but couldnt find one. Can anyone help me?
Tom
so the output is buffored per line. the output looks something like
----- somedata some data
some data
some data
some data
------ new data new
new new
new
new
new
ldkslsdjf
the sequence starts with -------, now I want to have a buffor where I oneventdata
it would add to the string I have the new data then phrase it looking for ------ the new sequence if there is one then the the thing would get processed. Now I tried looking for a split function that would allow the delimeter to be another string but couldnt find one. Can anyone help me?
Tom
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
any results?
ASKER
Sorry, I took some time off :)
It works :)
Thanks
Tom
It works :)
Thanks
Tom
I:=pos('-- ',inputdata);
if I>0 then begin
leftside:=copy(inputdata,1
rightside:=copy(inputdata,
end;