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

Modified:
docs/Perl6/Spec/S05-regex.pod
Log:
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 @@
=over

=item * ident
+X<ident>

Match an identifier.

=item * upper
+X<upper>

Match a single uppercase character.

=item * lower
+X<lower>

Match a single lowercase character.

=item * alpha
+X<alpha>

Match a single alphabetic character.

=item * digit
+X<digit>

Match a single digit.

=item * xdigit
+X<xdigit>

Match a single hexadecimal digit.

=item * print
+X<print>

Match a single printable character.

=item * graph
+X<graph>

Match a single "graphical" character.

=item * cntrl
+X<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
+X<punct>

Match a single punctuation character.

=item * alnum
+X<alnum>

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

=item * wb
+X<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
+X<ww>

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

=item * ws
+X<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
+X<space>

Match a single whitespace character (same as C< \s > ).

=item * blank
+X<blank>

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

=item * before C<pattern>
+S<before>

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

=item * after C<pattern>
+X<after>

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 * <?>
+X<?>

Match a null string, viz., always returns true

=item * <!>
+X<!>

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
categoriesperl
postedJul 27, '09 at 2:52p
activeJul 27, '09 at 2:52p
posts1
users1
websiteperl6.org

1 user in discussion

Pugs-commits: 1 post

People

Translate

site design / logo © 2021 Grokbase