Re: [fpc-pascal] RegExpr - replace

2014-09-06 Thread Marcos Douglas
Well, I got it. Is possible using a combination of these : r.MatchPos and r.MatchLen for I := 1 to r.SubExprMatchCount do begin S := Format('line %d pos:%d len:%d',[I, r.MatchPos[I], r.MatchLen[I]]); Memo1.Append(S); end; I can use StringReplace function to replace these values. -- Marcos D

[fpc-pascal] RegExpr - replace

2014-09-06 Thread Marcos Douglas
Hi, I'm using RegExpr to parse some parts, just SOME parts, of a HTML and works perfectly. But, in one case I need identify a "pattern" to reuse using new "values". Please, see the example (using Lazarus) bellow: procedure TForm1.Button1Click(Sender: TObject); var InputStr: string; r: TRegEx