In our previous episode, Mark Morgan Lloyd said: > 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 :-)
Well, at least it starts with a laugh :) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal