<?xml version="1.0" encoding="windows-1252"?>
<node id="179670" title="Re: Re: Perl6: too bad non-greediness is not made the default" created="2002-07-05 11:55:29" updated="2005-08-12 09:10:24">
<type id="11">
note</type>
<author id="31579">
stefp</author>
<data>
<field name="doctext">
I beg to differ.

My general principle is to be lax on what I receive and
strict on what I  emit.

So I try to write my regexen as lax as possible and to
"synchronize" my match on characters/sequences I am sure
 will be present
in the input. This means that I often use &lt;code&gt;.*?&lt;/code&gt;
in my regexen. Using the greedy counterpart will lead to
a lot of backtracking and more so geometrically with the
number of &lt;code&gt;.*?&lt;/code&gt;.
 Also I incrementally build my regexen 
 testing them on samples: non greedy match also is
less a nuisance here when examining the matches.&lt;p&gt;

&lt;i&gt;Regexen are a tricky art&lt;/i&gt; and I like to
&lt;a href="http://paris.mongueurs.net/assombri/opc3/Stephane_Payrard.tar.gz"&gt;
abuse&lt;/a&gt; it at (*) the risk of being called &lt;a href="http://www.samag.com/documents/s=1336/sam03030015/"&gt;demented&lt;/a&gt;.

(*) And I beg to disagree with Felix Gallo, France is the
lang of semiology, not of semiotics...
 and hair splitting too, BTW. And, on a related field,
 the main
tagmemics foray in France is collateral  to the introduction of american
camelides but has yet to appear widely in French. 
 &lt;a href=""&gt;tagmemique&lt;/a&gt; is indeed French neologism that  googlewhacks until the present node 
referencing 
 of a
node 

&lt;p&gt; -- &lt;a href="/index.pl?node=stefp&amp;lastnode_id=1072"&gt;
stefp&lt;/a&gt; (qui aime couper les cheveux  en quatre)-- check out &lt;a href="http://texmacs.org"&gt;TeXmacs&lt;/a&gt; 
&lt;a href="http://alqua.com/tmresources/"&gt;wiki&lt;/a&gt;</field>
<field name="root_node">
179555</field>
<field name="parent_node">
179644</field>
</data>
</node>
