Answer the question
In order to leave comments, you need to log in
How to find the desired text in a string, between characters?
Good evening!
Tell me how to implement the function in python:
We have text on the page -
-----AAAaaaaAAAf-----<br />
текст овер 300 знаков<br />
-----AAAaaaaAAAf -----<br />
-----AAAaaaaAAAf -----<br />
and <br />
function Pars(T_, ForS, _T: string): string;
var
a, b: integer;
begin
Result := '';
if (T_ = '') or (ForS = '') or (_T = '') then Exit;
a := Pos(T_, ForS);
if a = 0 then Exit
else a := a + Length(T_);
ForS := Copy(ForS, a, Length(ForS) - a + 1);
b := Pos(_T, ForS);
if b > 0 then Result := Copy(ForS, 1, b - 1);
end;
text:= Pars(' MESSAGE -----<br />',str,'<br />');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question