[fpc-pascal] Possible FindPart extensions?

2005-05-15 Thread L505
Something I am unsure about here (maybe I will need to implement it):

When using FindPart function, and utilizing wild cards, I cannot figure a way 
to calculate the length of the
string found. Only the matching start position of the found string.
Any ideas?

Lars


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Attn: Mattias Gaertner: regexpr

2005-05-15 Thread L505
>Mattias Gaertner nc-gaertnma [EMAIL PROTECTED] netcologne.de
>Wed, 30 Oct 2002 15:56:09 +0100

>> Another option is
>> http://anso.virtualave.net/delphi_stuff.htm#TRegExpr
>>
>> But I doubt that 1.0.x will eat it. Even for 1.1 one or
>> two things need a fix.

>I downloaded it, changed a few things for mode objfpc 1.0.x and tested
>some examples successfully.
>What will not work?

>
>Mattias

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 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.

Lars


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Mattias Gaertner: regexpr

2005-05-15 Thread L505
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.. 
so.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
to "Regexpr2.pas".

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 ExampleRegexpr;

Uses
 Regexpr2;

{
Program to demonstrate the secondary Regular expression unit
  Note: not the one by Florian, but the RegexprStudio.
}

const
 InputStr : PChar = 'This is a simple string.';
var
  TestRgx:tregexpr;
begin
   testrgx:=tregexpr.create;
   testrgx.expression:='i(.*)P';
   testrgx.exec(InputStr);
   writeln('The main match: ' + testrgx.Match[0]);
   writeln('The first back reference match: ' + testrgx.Match[1]);
   If testrgx <> nil then
   begin
testrgx.free; //should have used FreeAndNil!
testrgx.nil;
   end;
   readln;

end.

Lars
Canada

- 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
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.
|
| Lars
|


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Mattias Gaertner: regexpr

2005-05-15 Thread L505
Oops, error in my last program I sent to the list, I  meant this:

Program ExampleRegexpr;

Uses
 Regexpr2;

{
Program to demonstrate the secondary Regular expression unit
  Note: not the one by Florian, but the RegexprStudio.
}

const
 InputStr : PChar = 'This is a simple string.';
var
  TestRgx:tregexpr;
begin
   testrgx:=tregexpr.create;
   testrgx.expression:='i(.*)s';
   testrgx.exec(InputStr);
   writeln('The main match: ',  testrgx.Match[0]);
   writeln('The first back reference match: ',  testrgx.Match[1]);
   If testrgx <> nil then
   begin
testrgx.free; //should have used FreeAndNil!
testrgx:=nil;
   end;
   readln;

end.

Original Message
| Program ExampleRegexpr;
| Uses
|  Regexpr2;

| {
| Program to demonstrate the secondary Regular expression unit
|   Note: not the one by Florian, but the RegexprStudio.
| }


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Clone the freepascal.org/contrib/ section...

2005-05-15 Thread L505
Hi,

I think maybe another section "Contributed Examples" could be useful in 
addition to contributed units In this
cloned section, it will appear similar to the Contributed Units section, but in 
fact it is a "contributed
examples" section.  This way users can upload descriptions of their example 
programs designed with freepascal,
and point to a url and FTP to download that example. (i.e. small programs 
demonstrating how to use freepascal
and her units).

Another idea would be to have another cloned section called "Contributed 
Programs". This section could contain
all programs designed with freepascal that are fully working shipped with 
sources and/or binaries. I see some
fully working binary programs right now in the Misc section but I think they'd 
be good having their own
section on the site. This way users can upload descriptions of their functional 
programs designed with
freepascal, and point to a url and FTP to download that functional program. 
(i.e. freecommander, DelphiOS,
FPS - IDE, etc.).

What do you think?

Also, if you want me to help let me know.. I can maybe do things like this.. 
are you guys using PHP and MySql
to manage the site?

I may also just make a dedicated freepascal section on my domain and server.. 
doing the above tasks using PSP,
so either way.

Lars


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Clone the freepascal.org/contrib/ section...

2005-05-15 Thread Michalis Kamburelis
L505 wrote:
Hi,
I think maybe another section "Contributed Examples" could be useful in 
addition to contributed units In this
cloned section, it will appear similar to the Contributed Units section, but in fact 
it is a "contributed
examples" section.  This way users can upload descriptions of their example 
programs designed with freepascal,
and point to a url and FTP to download that example. (i.e. small programs 
demonstrating how to use freepascal
and her units).
Another idea would be to have another cloned section called "Contributed 
Programs". This section could contain
all programs designed with freepascal that are fully working shipped with 
sources and/or binaries. I see some
fully working binary programs right now in the Misc section but I think they'd 
be good having their own
section on the site. This way users can upload descriptions of their functional 
programs designed with
freepascal, and point to a url and FTP to download that functional program. 
(i.e. freecommander, DelphiOS,
FPS - IDE, etc.).
What do you think?
Also, if you want me to help let me know.. I can maybe do things like this.. 
are you guys using PHP and MySql
to manage the site?
I may also just make a dedicated freepascal section on my domain and server.. 
doing the above tasks using PSP,
so either way.
Lars
I think that you can create such longer descriptions of contributed 
things in FPC wiki, [http://www.freepascal.org/wiki/]. On main page 
there is a link to "Contributed Units". Just follow it, create new page, 
and list there various pages describing contributed things. Then you can 
create whole pages dedicated to some particular contributed things.

Michalis
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Clone the freepascal.org/contrib/ section...

2005-05-15 Thread L505
|
| I think that you can create such longer descriptions of contributed
| things in FPC wiki, [http://www.freepascal.org/wiki/]. On main page
| there is a link to "Contributed Units". Just follow it, create new page,
| and list there various pages describing contributed things. Then you can
| create whole pages dedicated to some particular contributed things.
|
| Michalis
|

And throw it all in the Misc section? Just seems like the Misc section would 
get overloaded, with all this
stuff.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Clone the freepascal.org/contrib/ section...

2005-05-15 Thread L505

|
| Ahh I see now, in the actual wiki there are info regarding contributed units. 
I think the reason I couldn't
| ever find these pages was because you have to log in. Does this wiki get 
indexed by the search engines like
| google if there is login required?
|
| I have been using the old freepascal website to download stuff, I didn't 
really know about the wiki. So
| something must not be getting indexed.
|

Ohhh now I see, it's because the contributed units page is blank. So -I- have 
to do the work and start filling
it in now ;-)
I thought maybe that someone had at least already filled the page in with a 
couple of words.

Well, it seems I've spammed quite a few emails to the freepascal mailing list 
today, but at least I am making
progress with freepascal projects today ;-)

Lars


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal