0 Members and 1 Guest are viewing this topic.
Consider using Regex. Much more elegant and probably faster.And is that Java?
but I dont want to be depend on Regex, cause its a suprise and I want it to work on everyones computer (everyone with Windows) without having them to upgrade their .net version
Isn't regex a part of .net framework 2.0?
dont know, I never use Regex
Kinda fucked up to read When I was doing a client for an online dictionary, I didn't know regex at that time. If you want I can show you the extracting part. It's in Delphi though, but you may still get the algorithm idea.
sure but regex is .net 4.0 so im not going to use it :S
function pavyzdys(yKur : ansistring) : ansistring; var Pavyzdys : Record Start,Endd : integer; end; i,m : integer;begin//==== result := '';//==== if AnsiContainsText(yKur,'<p class=''pavyzdys''>') then begin Pavyzdys.Start := AnsiPos('<p class=''pavyzdys''>',yKur); i := Pavyzdys.Start; m := 0; repeat Inc(i); m := m + 1 until (AnsiPos(Copy(yKur,Pavyzdys.Start,m),'</p>') <> 0); end;//==== result := Copy(yKur,Pavyzdys.Start,m);end;