Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread William Oliveira Ferreira
I think the first step is to add FPC 2.6 to the Installer package (at least on Windows). On Linux, I always download the "recomended" version: http://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386%20DEB/Lazarus%200.9.30.2/ as you can see, it´s offered two versions of FPC and that´s t

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Marco van de Voort
On Fri, Dec 23, 2011 at 04:20:23PM +0100, Sven Barth wrote: > > With the caveat that fixes might get applied to one or the other. For > > example I see that Ludo's fix for > > http://mantis.freepascal.org/view.php?id=20806 (plus at least one > > alignment issue) is in FPC 19759 but not in Lazarus 3

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 23.12.2011 15:13, schrieb Mark Morgan Lloyd: Marco van de Voort wrote: On Fri, Dec 23, 2011 at 10:47:23AM +0100, Sven Barth wrote: The regex that I'm using belongs to FCL.>> "[FCL]RegEx.TRegexEngine". TRegExpr (unit RegExpr) is also part of FCL in 2.7.1 since some weeks/m

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Sven Barth
Am 23.12.2011 15:13, schrieb Mark Morgan Lloyd: Marco van de Voort wrote: On Fri, Dec 23, 2011 at 10:47:23AM +0100, Sven Barth wrote: The regex that I'm using belongs to FCL.>> "[FCL]RegEx.TRegexEngine". TRegExpr (unit RegExpr) is also part of FCL in 2.7.1 since some weeks/months. August 29t

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Mark Morgan Lloyd
Marco van de Voort wrote: On Fri, Dec 23, 2011 at 10:47:23AM +0100, Sven Barth wrote: The regex that I'm using belongs to FCL.>> "[FCL]RegEx.TRegexEngine". TRegExpr (unit RegExpr) is also part of FCL in 2.7.1 since some weeks/months. August 29th, pulled up into 2.5.1/2.6.0 about a month late

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Marco van de Voort
On Fri, Dec 23, 2011 at 10:47:23AM +0100, Sven Barth wrote: > > > > The regex that I'm using belongs to FCL.>> "[FCL]RegEx.TRegexEngine". > > TRegExpr (unit RegExpr) is also part of FCL in 2.7.1 since some > weeks/months. August 29th, pulled up into 2.5.1/2.6.0 about a month later. --

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Sven Barth
Am 23.12.2011 10:55, schrieb Graeme Geldenhuys: The regex that I'm using belongs to FCL.>> "[FCL]RegEx.TRegexEngine". As far as I remember the regex unit included in FCL (released versions of FPC) is pretty limited in what it can do. I would not use that for any regex project. Use the TRegExp

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread silvioprog
2011/12/23 Graeme Geldenhuys : > On 23 December 2011 11:29, silvioprog wrote: >> >> The regex that he indicated uses LCL yes! >> "[LCL]SynRegExpr.TRegExpr". > > Look inside that unit. It is the TRegExpr library originally created > by Andrey V. Sorokin for Delphi. It has no dependency on LCL units

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Graeme Geldenhuys
On 23 December 2011 11:29, silvioprog wrote: > > The regex that he indicated uses LCL yes! >> "[LCL]SynRegExpr.TRegExpr". Look inside that unit. It is the TRegExpr library originally created by Andrey V. Sorokin for Delphi. It has no dependency on LCL units at all, only the RTL. Simply copy that

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread silvioprog
I followed this sample: http://bugs.freepascal.org/view.php?id=14236 -- Silvio Clécio Site - LazSolutions - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org htt

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread silvioprog
2011/12/23 Sven Barth : > Am 23.12.2011 10:29, schrieb silvioprog: >> >> 2011/12/23 Graeme Geldenhuys: >>> >>> On 22 December 2011 21:25, silvioprog  wrote: I can not use the LCL. >>> >>> >>> What has regex and LCL have to do with each other? Why do you think >>> regex requires LCL?

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Sven Barth
Am 23.12.2011 10:29, schrieb silvioprog: 2011/12/23 Graeme Geldenhuys: On 22 December 2011 21:25, silvioprog wrote: I can not use the LCL. What has regex and LCL have to do with each other? Why do you think regex requires LCL? I have many apps that use regex, and none of the depend on LCL.

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread silvioprog
2011/12/23 Graeme Geldenhuys : > On 22 December 2011 21:25, silvioprog wrote: >> >> I can not use the LCL. > > What has regex and LCL have to do with each other? Why do you think > regex requires LCL? I have many apps that use regex, and none of the > depend on LCL. The regex that he indicated us

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Mark Morgan Lloyd
Graeme Geldenhuys wrote: On 22 December 2011 21:25, silvioprog wrote:>> I can not use the LCL. What has regex and LCL have to do with each other? Why do you thinkregex requires LCL? I have many apps that use regex, and none of thedepend on LCL. I was, in retrospect, slightly out of order in

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-23 Thread Felipe Monteiro de Carvalho
Regexpr is documented in the wiki: http://wiki.lazarus.freepascal.org/Regexpr I recommend using the sorokin version. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/m

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-22 Thread Graeme Geldenhuys
On 22 December 2011 21:25, silvioprog wrote: > > I can not use the LCL. What has regex and LCL have to do with each other? Why do you think regex requires LCL? I have many apps that use regex, and none of the depend on LCL. -- Regards,   - Graeme - __

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-22 Thread silvioprog
2011/12/22 Mark Morgan Lloyd : > silvioprog wrote: >> >> Hi, >> >> The correct way to use RegEx is like I'm showing below? (I saw this >> code in bugtracker) > >  regex1 := TRegExpr.Create; >  regex1.Expression := pattern1; > >  with regex1 do begin >    if Exec(test1) then begin >      WriteLn('ma

Re: [Lazarus] What's the correct way to use TRegexEngine?

2011-12-22 Thread Mark Morgan Lloyd
silvioprog wrote: Hi, The correct way to use RegEx is like I'm showing below? (I saw this code in bugtracker) regex1 := TRegExpr.Create; regex1.Expression := pattern1; with regex1 do begin if Exec(test1) then begin WriteLn('match'); end else WriteLn('no match'); --

[Lazarus] What's the correct way to use TRegexEngine?

2011-12-22 Thread silvioprog
Hi, The correct way to use RegEx is like I'm showing below? (I saw this code in bugtracker) uses RegEx; procedure TForm1.Button1Click(Sender: TObject); var VRegEx: TRegexEngine; VErrorCode: TRegexError; VOffset, VErrorPos, VMatchPos: Integer; begin VRegEx := TRegexEngine.Create('[0-9]'