Author: pmichaud
Date: 2009-03-09 20:50:03 +0100 (Mon, 09 Mar 2009)
New Revision: 25767

Modified:
   docs/Perl6/Spec/S05-regex.pod
Log:
[spec]:  Update S05: remove <word>, add <ww>, revise <wb>, <ws>, <space>, and 
<blank>.


Modified: docs/Perl6/Spec/S05-regex.pod
===================================================================
--- docs/Perl6/Spec/S05-regex.pod       2009-03-09 17:33:17 UTC (rev 25766)
+++ docs/Perl6/Spec/S05-regex.pod       2009-03-09 19:50:03 UTC (rev 25767)
@@ -1619,9 +1619,9 @@
 
 =back
 
-=head2 Predefined Metasyntax
+=head2 Predefined Subrules
 
-The following symbols are predefined entries in the metasyntax.  
+These are the predefined subrules for any grammar or regex:
 
 =over
 
@@ -1669,25 +1669,31 @@
 
 Match a single alphanumeric character. This is equivalent to <+alpha +digit> .
 
-= item * word
+=item * wb
 
-Match a single word character, viz., alphanumeric plus '_'.
+Returns a zero-width match that is true at word boundaries.  A word
+boundary is a spot with a "\w" on one side and a "\W" on the other
+side (in either order), counting the beginning and end of the string
+as matching "\W".
 
-=item * wb
+=item * ww
 
-Returns true if we're at a word boundary. A word boundary is a spot between 
two characters, one which matches <word>, the other matches <-word>, counting 
the imaginary characters off the beginning and end of the string as matching a 
<-word>.
+Matches between two word characters (zero-width match).
 
 =item * ws
 
-Match whitespace between tokens.
+Matches required whitespace between two word characters, optional
+whitespace otherwise.  This is roughly equivalent to  C<< <!ww> \s* >>
+(C<ws> isn't required to use the C<ww> subrule).
 
 =item * space
 
-Match a single whitespace character. Hence C< <ws> > is equivalent to C< 
<space>+ >.
+Match a single whitespace character (same as C< \s > ).
 
 =item * blank
 
-Match a single "blank" character. Differs from C< <space> > which include 
C<tab>'s etc.
+Match a single "blank" character -- in most locales, this corresponds
+to space and tab.
 
 =item * before C<pattern>
 

Reply via email to