Author: szabgab
Date: 2009-07-27 16:51:57 +0200 (Mon, 27 Jul 2009)
New Revision: 27751

add X<> tags to Predefined Subrules

Modified: docs/Perl6/Spec/S05-regex.pod
--- docs/Perl6/Spec/S05-regex.pod 2009-07-27 11:16:51 UTC (rev 27750)
+++ docs/Perl6/Spec/S05-regex.pod 2009-07-27 14:51:57 UTC (rev 27751)
@@ -1557,50 +1557,62 @@

=item * ident

Match an identifier.

=item * upper

Match a single uppercase character.

=item * lower

Match a single lowercase character.

=item * alpha

Match a single alphabetic character.

=item * digit

Match a single digit.

=item * xdigit

Match a single hexadecimal digit.

=item * print

Match a single printable character.

=item * graph

Match a single "graphical" character.

=item * cntrl

Match a single "control" character. A control character is usually one that doesn't produce output as such but instead controls the terminal somehow: for example newline and backspace are control characters. All characters with ord() less than 32 are usually classified as control characters (assuming ASCII, the ISO Latin character sets, and Unicode), as is the character with the ord() value of 127 (DEL ).

=item * punct

Match a single punctuation character.

=item * alnum

Match a single alphanumeric character. This is equivalent to <+alpha +digit> .

=item * wb

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
@@ -1608,41 +1620,49 @@
as matching "\W".

=item * ww

Matches between two word characters (zero-width match).

=item * ws

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 (same as C< \s > ).

=item * blank

Match a single "blank" character -- in most locales, this corresponds
to space and tab.

=item * before C<pattern>

Perform lookahead -- i.e., check if we're at a position where
C<pattern> matches. Returns a zero-width C<Match> object on

=item * after C<pattern>

Perform lookbehind -- i.e., check if the string before the
current position matches <pattern> (anchored at the end).
Returns a zero-width C<Match> object on success.

=item * <?>

Match a null string, viz., always returns true

=item * <!>

Inverse of <?>, viz., always returns false.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
postedJul 27, '09 at 2:52p
activeJul 27, '09 at 2:52p

1 user in discussion

Pugs-commits: 1 post



site design / logo © 2021 Grokbase