<?xml version="1.0" encoding="windows-1252"?>
<node id="23977" title="RE: (2) Pig Latin (another smidge closer)" created="2000-07-23 13:35:30" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="14909">
ybiC</author>
<data>
<field name="doctext">
Adding &lt;b&gt;qu|&lt;/b&gt; at the front of &amp;#036;1 and removing &lt;b&gt;q&lt;/b&gt; from &lt;b&gt;&amp;#091;...&amp;#093;&lt;/b&gt; provides support for the &amp;quot;qu&amp;quot; combination. &amp;nbsp; My first attempted tweak was to add &lt;b&gt;&amp;#040;qu&amp;#041;&lt;/b&gt; inside &amp;#036;1&amp;#039;s  &lt;b&gt;&amp;#091;...&amp;#093;&lt;/b&gt; but that hosed things for words like &amp;quot;jumped&amp;quot;.

&lt;p&gt;
Bonus points for guessing the cliche phrase I tested this with.  &amp;nbsp;&lt;i&gt;&amp;lt;grin&amp;gt;&lt;/i&gt;

&lt;code&gt;
#!/usr/bin/perl -w
use strict;
while(&lt;&gt;) {
    s{ \b(qu|[bcdfghjklmpnrstvwxyz]*)([aeiou]+)(\w*) }
     { if($1) {$2.$3.$1.'ay'}
       else {$2.$3."way"} }egix;
     print;
     }
# END
&lt;/code&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cheers,
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ybiC]</field>
<field name="root_node">
3586</field>
<field name="parent_node">
3593</field>
</data>
</node>
