[fpc-pascal] Re: Mattias Gaertner: regexpr
fpc505 at z505.com
Mon May 16 00:04:35 CEST 2005
Knock knock, is anyone home on Sunday in Netherlands and elsewhere? The list is quiet... ;-)
Well, I looked through the Lazarus sources and Synedit sources, because I remember the fact that synedit had
it's own semi modified version of Regexpr Studio's Tregexpr. And hey, if Lazarus runs on GnuLinux, and it uses
Synedit, how is it using regular expressions?? It must be using them.. sooooo.....Of course, I went in and
found that synregexpr unit. Then I just commented out some of the IfDef's for syn_Lazarus and renamed the unit
Compiler eats up the Regexpr2 I made with no troubles. So now I can use regular expressions in freepascal
without problems, for generic uses (not just for synedit!).
I think we should put this unit up in the contributed units section on the FreePascal.org website. I'll put it
on my FTP too, because I'm sure others are looking for a working regular expression unit with back references.
Hopefully I can also notify the owner of RegexprStudio website to put the Regexpr2.pas unit I made, because
his website only offers a freepascal regexpr unit that works on Win32 right now.
Of course we always have the other regexpr unit by Florian to work on also.. since it's not completed yet.
Example simple regular expression program working in Linux
Program to demonstrate the secondary Regular expression unit
Note: not the one by Florian, but the RegexprStudio.
InputStr : PChar = 'This is a simple string.';
writeln('The main match: ' + testrgx.Match);
writeln('The first back reference match: ' + testrgx.Match);
If testrgx <> nil then
testrgx.free; //should have used FreeAndNil!
----- Original Message -----
| Attn: Mattias..(or anyone else who knows about regexpr units)
| Do you know which unit this is that you talked about of above? 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
| that was. If it was the Regexpr Studio, one then I have it. It seems to be geared toward Win32. I will
| 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.
More information about the fpc-pascal