1PPI::Token::Regexp(3) User Contributed Perl DocumentationPPI::Token::Regexp(3)
2
3
4

NAME

6       PPI::Token::Regexp - Regular expression abstract base class
7

INHERITANCE

9         PPI::Token::Regexp
10         isa PPI::Token
11             isa PPI::Element
12

DESCRIPTION

14       The "PPI::Token::Regexp" class is never instantiated, and simply
15       provides a common abstract base class for the three regular expression
16       classes. These being:
17
18       m// - PPI::Token::Regexp::Match
19       s/// - PPI::Token::Regexp::Substitute
20       tr/// - PPI::Token::Regexp::Transliterate
21
22       The names are hopefully obvious enough not to have to explain what each
23       class is. See their pages for more details.
24
25       To save some confusion, it's worth pointing out here that "qr//" is not
26       a regular expression (which PPI takes to mean something that will
27       actually examine or modify a string), but rather a quote-like operator
28       that acts as a constructor for compiled Regexp objects.
29

METHODS

31       The following methods are inherited by this class' offspring:
32
33   get_match_string
34       The "get_match_string" method returns the portion of the regexp that
35       performs the match.
36
37   get_substitute_string
38       The "get_substitute_string" method returns the portion of the regexp
39       that is substituted for the match, if any.  If the regexp does not
40       substitute, "undef" is returned.
41
42   get_modifiers
43       The "get_modifiers" method returns the modifiers of the regexp.
44
45   get_delimiters
46       The "get_delimiters" method returns the delimiters of the regexp as an
47       array. The first element is the delimiters of the match string, and the
48       second element (if any) is the delimiters of the substitute string (if
49       any).
50

SUPPORT

52       See the support section in the main module.
53

AUTHOR

55       Adam Kennedy <adamk@cpan.org>
56
58       Copyright 2001 - 2011 Adam Kennedy.
59
60       This program is free software; you can redistribute it and/or modify it
61       under the same terms as Perl itself.
62
63       The full text of the license can be found in the LICENSE file included
64       with this module.
65
66
67
68perl v5.30.1                      2020-01-30             PPI::Token::Regexp(3)
Impressum