[fpc-pascal] My favourite missing feature

ik idokan at gmail.com
Tue Dec 23 01:17:35 CET 2008


Your regex is awful :)

Why not to write it as follows (ruff rewrite):

IF cells[2, dateTime] = m|((\d\d)/){2}(\d{2,4})\s.*| THEN BEGIN

Anyway, I'm not sure how good idea it will be to have it part of the syntax.

Happy Hannuka everyone :P

Ido


On Mon, Dec 22, 2008 at 7:56 PM, Mark Morgan Lloyd <
markMLl.fpc-pascal at telemetry.co.uk> wrote:

> There seem to be a number of people currently making outrageous suggestions
> about missing features or how FPC could best be repackaged and promoted, so
> since it's the season of good will I trust that folk will tolerate this one
> from me.
>
> There's been a recent thread in fpc-other on second languages, but it
> appeared to focus more on what was a useful part of a developer's skillset
> rather than what people miss from Pascal.
>
> What /I/ miss is Perl's pattern matching, and I miss it to the extent that
> in some of my own scripting stuff I've implemented it myself:
>
> IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN
>  cells[6, 1]:= /1/ + ordinalSuffix(/1/);
>  cells[7, 1]:= monthName(/2/);
>  IF /3/ > 999 THEN
>    cells[8, 1]:= /3/
>  ELSE
>    cells[8, 1]:= '20' + /3/
> END;
>
> I knew nobody'd like it- I'll get my coat.
>
> Merry Christmas and a happy New Year, everybody :-)
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or colleagues]
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20081223/f8bab1b9/attachment.html>


More information about the fpc-pascal mailing list