Regexp:...pressed(3)
π Regexp::Assemble::Compressed π
okay bestie so this is a User Contributed Perl Documentation page, section 3 β aka the part of the manual where Perl people put their cool little libraries, and this one is literally called Regexp::Assemble::Compressed. no cap, the title is a whole mouthful, so let's get into it π«Ά
β¨ NAME β¨
Regexp::Assemble::Compressed β Assemble more compressed Regular Expression π
like... it builds regexes. compressed ones. more of them. iconic behaviour, honestly.
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste ready, character for character:
use Regexp::Assemble::Compressed;
my $ra = Regexp::Assemble::Compressed->new;
my @cctlds = qw(ma mc md me mf mg mh mk ml mm mn mo mp
mq mr ms mt mu mv mw mx my mz);
for my $tld ( @cctlds ) {
$ra->add( $tld );
}
print $ra->re; # prints m[ac-hk-z].
# Regexp::Assemble prints m[acdefghklmnopqrstuvwxyz]
so you make a $ra, you feed it a whole list of country-code TLDs one by one with ->add, and then ->re hands you back the regex. and look at the output π β this module gives you m[ac-hk-z]. while plain Regexp::Assemble gives you m[acdefghklmnopqrstuvwxyz]. same matching energy, way fewer characters. it's giving compression. it's giving efficiency. we love to see it β¨
π DESCRIPTION π
so Regexp::Assemble::Compressed is a subclass of Regexp::Assemble. π¦
and what does it do? it assembles more compressed regular expressions. that's it, that's the whole thing. it inherits all the parent's energy and then squeezes the output even tighter. periodt. π
π AUTHOR π
Koichi Taniguchi <taniguchi@livedoor.jp> β thank you for your service, king π«‘π
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π§
(so yes, go forth, remix, redistribute β just keep it on the same terms as Perl itself, that's the rule, no cap)
β SEE ALSO β
Regexp::Assembleβ the parent class, the origin story, the blueprint. if you liked this one go read that one, iykyk π
and that's the whole page bestie!! this one shipped as part of perl v5.42.0 and the page itself is dated 2025-07-25 πΈ so like, pretty recent, pretty fresh, pretty slay. go compress some regexes, you've got this π¦πβ¨
π¦ where this page comes from
- fedora 43: perl-Regexp-Assemble-Compressed 0.02-37.fc43 Β· 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