<div dir="ltr">It looks for a date pattern like the follow<br><br>10/10/08 and 10/10/2008 with space and then some other chars as well.<br><br>I think if it was with boundaries of begin and/or end (^ and $) it would work even better.<br>
<br>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).<br><br>This entire thingy called regular expression or regex for short.<br><br>
Ido<br>
<br><br><div class="gmail_quote">On Wed, Dec 24, 2008 at 1:17 AM, Marc Weustink <span dir="ltr"><<a href="mailto:marc@dommelstein.net">marc@dommelstein.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Mark Morgan Lloyd wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.<br>
<br>
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.<br>
<br>
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:<br>
<br>
IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN<br>
</blockquote>
<br></div>
and now in plain english, what does it match ?<br><font color="#888888">
<br>
Marc</font><div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>