[fpc-pascal] Attn: Mattias Gaertner: regexpr
fpc505 at z505.com
Mon May 16 20:43:58 CEST 2005
| > Attn: Mattias..(or anyone else who knows about regexpr units)
| > Do you know which unit this is that you talked about of above?
| I don't remember. In the last years I used several regexpr units with fpc.
| synregexpr works with perl style regular expressions.
| > I'm
| > looking for regexpr units and I wondered if this unit worked for you with
| > those minor changes you made. The URL does not work and I wondered which
| > unit that was. If it was the Regexpr Studio, one then I have it. It seems
| > to be geared toward Win32. I will modify it for linux maybe if this is
| > possible, but I thought maybe you had already found something yourself, or
| > mucked around and got something working. I'm looking for a Linux capable
| > regexpr unit with back referencing available.
| synregexpr does (e.g. $1).
Synregexpr is a similar unit (basically exactly the same) as the one I have used for years in my Delphi
projects.. so that is great to find that! It was just a matter of finding it, since there has been little
discussion of regexes it on the mailing lists ;-)
I have uploaded this working regular expression unit (modified a bit) to the contributed units section on the
That unit has worked fine for me in Delphi, so I'm all set for freepascal now. The only thing I noticed when
using it in Delphi was that it was a bit slow in a custom program I built when I used it to modify about
10,000 files doing a long 10-30 minute search and replace.. (compared to some other C++ programs I have used).
But I rarely do that - usually just 1-10 files that I need to modify. Maybe there is some improvements in
speed that I could work on in those units eventually. I will have to do rigorous testing in freepascal !
More information about the fpc-pascal