[fpc-pascal] My favourite missing feature

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Dec 24 00:59:24 CET 2008


On Wed, 24 Dec 2008 01:41:16 +0200
ik <idokan at gmail.com> wrote:

> It looks for a date pattern like the follow
> 
> 10/10/08 and 10/10/2008 with space and then some other chars as well.
> 
> I think if it was with boundaries of begin and/or end (^ and $) it
> would work even better.
> 
> The () indicates groups. each group is the string extracted from the
> pattern, and can be used (that's the /1/ and /2/ that he wrote).
> 
> This entire thingy called regular expression or regex for short.
> 
> Ido
> 
> 
> On Wed, Dec 24, 2008 at 1:17 AM, Marc Weustink <marc at dommelstein.net>
> wrote:
> 
> > Mark Morgan Lloyd 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
> >>
> >
> > and now in plain english, what does it match ?

see also
http://wiki.lazarus.freepascal.org/IDE_regular_expressions


Mattias



More information about the fpc-pascal mailing list