Re: [fpc-pascal] console gdb in mac

2014-09-07 Thread Felipe Monteiro de Carvalho
On Sun, Sep 7, 2014 at 5:19 PM, Felipe Monteiro de Carvalho wrote: > I'm trying to debug lcl-cocoa, but the debugger in the IDE is not > helping (not stopping in breakpoints inside the LCL, can't read > variable names, etc...) Well, I see now that IDE debugging generally works, but that reliably

[fpc-pascal] console gdb in mac

2014-09-07 Thread Felipe Monteiro de Carvalho
Hello, I'm trying to debug lcl-cocoa, but the debugger in the IDE is not helping (not stopping in breakpoints inside the LCL, can't read variable names, etc...) So I moved to the console gdb, and I can already break, step over, etc. But, how to read variable names? I guess a wierd mangling will

Re: [fpc-pascal] RegExpr - replace

2014-09-07 Thread Marcos Douglas
On Sun, Sep 7, 2014 at 9:36 AM, leledumbo wrote: > > If I'm not mistaken what you want: > > {$mode objfpc}{$H+} > uses > RegExpr; > var > InputStr: string; > r: TRegExpr; > begin > r:= TRegExpr.Create; > try > InputStr := ' 28/07/2014 '; > r.Expression := '(\/)([0-9]+)(\/.*?pg\

Re: [fpc-pascal] RegExpr - replace

2014-09-07 Thread leledumbo
If I'm not mistaken what you want: {$mode objfpc}{$H+} uses RegExpr; var InputStr: string; r: TRegExpr; begin r:= TRegExpr.Create; try InputStr := ' 28/07/2014 '; r.Expression := '(\/)([0-9]+)(\/.*?pg\-)(\d+).*?"'; r.Exec(InputStr); WriteLn(r.Substitute('$1$4$3$2'));