expandafter at yahoo.com
Thu Nov 8 03:00:40 CET 2007
--- L <L at z505.com> wrote:
> > - JCL is not in a runnable state for most FPC targets.
> > - translated Delphi headers are typically not clean for cross platform
> > (most
> > notably 64-bit) use.
> Jeff's unit may have been, for all you know, which is the unit that I
> supplied a
> uRL to in my first email. Which I cannot download, and am waiting for Jeff
> reply. In the mean time, S. Fisher has already got a unit working while we
For everbody who wants pcre, here's how I got it working.
download "PCRE 6.7 DLL".
To the file PCRE.pas, apply the attached patch file. If you don't,
there will be errors during compiling.
I couldn't find any documentation. This quick and dirty little
program may help.
function count_matches( const needle, haystack: ansistring ):longint;
rx : iregex;
rx := regexCreate( needle );
result := 0;
where := 0;
capture := rx.match( haystack, where );
if not capture.success then break;
inc( result );
where := capture.groups.index + capture.groups.length;
rx : iregex;
md : idfamatchCollection;
i : integer;
str := 'Come back, Mac.';
rx := regexCreate( '(\w*)a(\w*)' );
capdata := rx.match( str );
if capdata.success then
writeln( 'found' );
writeln( capdata.groups.count, ' captures' );
for i:= 0 to capdata.groups.count - 1 do
writeln( ' ', capdata.groups[i].index, ' ', capdata.groups[i].length,
' value: ', capdata.groups[i].value );
writeln( 'not' );
md := rx.dfaMatch( str );
writeln( 'count: ', md.count );
if md.count > 0 then
writeln( 'dfamatch won' );
writeln( md.index, ' ', md.length,' ', md.value );
writeln( 'dfamatch failed' );
writeln( count_matches( 't', 'try to do it' ));
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 546 bytes
More information about the fpc-pascal