develooper Front page | perl.perl6.language | Postings from July 2008

[svn:perl6-synopsis] r14558 - doc/trunk/design/syn

From:
larry
Date:
July 7, 2008 21:40
Subject:
[svn:perl6-synopsis] r14558 - doc/trunk/design/syn
Author: larry
Date: Mon Jul  7 21:40:33 2008
New Revision: 14558

Modified:
   doc/trunk/design/syn/S05.pod

Log:
more clarifications and remember to thank cjfields++ this time :)


Modified: doc/trunk/design/syn/S05.pod
==============================================================================
--- doc/trunk/design/syn/S05.pod	(original)
+++ doc/trunk/design/syn/S05.pod	Mon Jul  7 21:40:33 2008
@@ -3692,6 +3692,9 @@
 the longest one wins.  In the case of two identical sequences the
 first in order wins.
 
+As with the string form, missing righthand elements replicate the
+final element, and a null array results in deletion instead.
+
 =item *
 
 The recognition done by the string and array forms is very basic.
@@ -3703,7 +3706,8 @@
     $str.=trans( [/ \h /,   '<',    '>',    '&'    ] =>
                  ['&nbsp;', '&lt;', '&gt;', '&amp;' ]);
 
-    $str.=trans( / \s+ /, ' ' );  # squash all whitespace to one space
+    $str.=trans( / \s+ / => ' ' );  # squash all whitespace to one space
+    $str.=trans( / <!alpha> / => '' );  # delete all non-alpha
 
 These submatches are mixed into the overall match in exactly the same way that
 they are mixed into parallel alternation in ordinary regex processing, so



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About