<div dir="ltr"><br clear="all"><br><div class="gmail_quote">On Wed, Dec 24, 2008 at 2:35 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><div></div><div class="Wj3C7c">Mattias Gaertner wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 24 Dec 2008 01:41:16 +0200<br>
ik <<a href="mailto:idokan@gmail.com" target="_blank">idokan@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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<br>
would work even better.<br>
<br>
The () indicates groups. each group is the string extracted from the<br>
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>
On Wed, Dec 24, 2008 at 1:17 AM, Marc Weustink <<a href="mailto:marc@dommelstein.net" target="_blank">marc@dommelstein.net</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mark Morgan Lloyd wrote:<br>
<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<br>
suggestions about missing features or how FPC could best be<br>
repackaged and promoted, so since it's the season of good will I<br>
trust that folk will tolerate this one from me.<br>
<br>
There's been a recent thread in fpc-other on second languages, but<br>
it appeared to focus more on what was a useful part of a<br>
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<br>
extent that in some of my own scripting stuff I've implemented it<br>
myself:<br>
<br>
IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN<br>
BEGIN<br>
<br>
</blockquote>
and now in plain english, what does it match ?<br>
</blockquote></blockquote>
<br>
see also<br>
<a href="http://wiki.lazarus.freepascal.org/IDE_regular_expressions" target="_blank">http://wiki.lazarus.freepascal.org/IDE_regular_expressions</a><br>
</blockquote>
<br></div></div>
I know what regular expressions are, I know that when you are writing them, you understand what you wanted to do, but 5 mins later you don't know anymore what it meant, let alone how to debug.</blockquote><div><br><br>
Funny, I'm not the original writer of the regex code, but I understood it. It's just another language for text patterns, that's all. A more complicated regex is harder to understand with that one I can agree, but like with Pascal, if you learn the language (and not only the syntax), you can understand most good written patterns.<br>
<br>Ido<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
(no it wasn't a serious question)<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>