How would a regex be to capture the block of variables declared in a delphi unit?
The closest I got to this was using this var[^=]*[^\)];
but with no success.
var
Variavel1 : string;
Variavel2, Variavel3: integer;
Variavel4,
Variavel5 : THandle;
function Soma(a, b: integer): integer;
var
Varivel1: integer;
Variavel2, Variavel3: integer;
begin
//...
end;
Any solution to identify variables is welcome.