PPI::Token::Regexp(3)
π PPI::Token::Regexp β the regexp glow-up page π
okay bestie, you've landed on PPI::Token::Regexp(3) from the User Contributed Perl Documentation collection. pull up a chair, grab a strawberry π, and let's get into it.
β¨ NAME β¨
PPI::Token::Regexp β the regular expression abstract base class, and she's literally the blueprint. π
πΈ INHERITANCE πΈ
the family tree, and yes it's giving royal lineage:
PPI::Token::Regexp
isa PPI::Token
isa PPI::Element
so she inherits from PPI::Token, which inherits from PPI::Element. iconic chain, no notes. π
π¦ DESCRIPTION π¦
okay so here's the tea: the PPI::Token::Regexp class is never instantiated. like, never ever. she doesn't do the work herself, she just shows up as the shared abstract base class for the three regular expression classes. and those three are:
m//βPPI::Token::Regexp::Matchπs///βPPI::Token::Regexp::Substituteβ¨tr///βPPI::Token::Regexp::Transliterateπ
the names are, like, hopefully obvious enough that nobody has to explain what each class does. go check their own pages if you want the full scoop, bestie.
and real quick, to save you from some confusion: it's worth pointing out right here that qr// is not a regular expression. nope! because when PPI says "regular expression," it means something that will actually examine or modify a string. qr// is a quote-like operator that acts as a constructor for compiled Regexp objects. different vibe entirely. iykyk. π
π METHODS π
the following methods are inherited by this class' offspring (so the whole lil regexp fam gets them):
get_match_stringβ returns the portion of the regexp that performs the match. π―get_substitute_stringβ returns the portion of the regexp that gets substituted in for the match, if there is any. and if the regexp doesn't substitute? you getundefback. sorry bestie, that's the deal. πget_modifiersβ returns the modifiers of the regexp. βget_delimitersβ returns the delimiters of the regexp as an array. the first element is the delimiters of the match string, and the second element (if any) is the delimiters of the substitute string (if any). two slots, very tidy. π§
π«Ά SUPPORT π«Ά
see the support section in the main module. that's where the help lives, go look. π
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
π COPYRIGHT π
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
no cap, that's the whole page. every flag, every class, every undef β all accounted for. periodt. π₯
so yeah, this was PPI::Token::Regexp(3), and the footer energy is: perl v5.42.0, dated 2026-01-17. mwah, go forth and parse some regexps, main character. πβ¨
π¦ where this page comes from
- fedora 44: perl-PPI 1.284-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms