Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc Match.Bool
  • Loading branch information
gfldex committed Dec 15, 2016
1 parent 2447134 commit a43c65e
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions doc/Type/Match.pod6
Expand Up @@ -6,12 +6,12 @@
class Match is Capture is Cool {}
C<Match> objects are the result of a successful regex match. They store
a reference to the original string (C<.orig>), positional and
named captures, the positions of the start and end of the match
in the original string, and a payload referred to as I<AST>
(abstract syntax tree), which can be used to build data structures
from complex regexes and grammars.
C<Match> objects are the result of a successful regex match, this does include
any zero-width match. They store a reference to the original string (C<.orig>),
positional and named captures, the positions of the start and end of the match
in the original string, and a payload referred to as I<AST> (abstract syntax
tree), which can be used to build data structures from complex regexes and
grammars.
Submatches are also C<Match> objects (or lists of C<Match> objects,
if the corresponding regex was quantified), so each match object
Expand Down Expand Up @@ -39,6 +39,19 @@ Returns the payload that was set with L<#method make>.
Alias for L<#method made>.
=head2 method Bool
Defined as:
method Bool(Capture:D: --> Bool:D)
Returns C<True> on successful and C<False> on unsuccessful matches. Please note
that any zero-width match can also be successful.
say 'abc' ~~ /^/;
say $/.from, ' ', $/.to, ' ', ?$/
# OUTPUT«「」␤0 0 True␤»
=head2 method Str
Defined as:
Expand Down

0 comments on commit a43c65e

Please sign in to comment.