REGEXP-ASSEMBLE(1p)
๐ REGEXP-ASSEMBLE(1p) ๐
okay bestie, welcome to the manual page for regexp-assemble, part of the User Contributed Perl Documentation. sit down, grab a boba, and let's get into it โจ
โจ NAME โจ
regexp-assemble โ assemble a list of regular expressions from a file ๐
๐ธ SYNOPSIS ๐ธ
regexp-assemble -abcdfinprsStTuUvw file [...]
like, that's the whole vibe. flags go brrr, file(s) go in, pattern comes out ๐
๐ฆ DESCRIPTION ๐ฆ
so basically it assembles a list of regular expression either from standard input or from a file, and it does all of that using the Regexp::Assemble module. it's giving "many regexes walk in, one regex walks out" ๐ชโจ
๐ OPTIONS ๐
-aโ look Ahead. it inserts(?=...)zero-width lookahead assertions into the pattern, but only where necessary. not me adding future-vision to your regex ๐ฎ-bโ Blank. blank lines? ignored. we don't see them, they don't exist ๐-cโ Comment. basic comment filtering, bestie. it strips off perl/shell comments (\s*#.*$/). bye bye yapping ๐-dโ Debug. turns on debugging output. go check outRegexp::Assemblefor the suitable values, iykyk ๐-iโ Indent. prints the regular expression using an indent of n so you can actually see the nesting. a.k.a. pretty-printing, and yes it implies-p๐-nโ No newline. does NOT print a newline after the pattern. lowkey so useful when you're interpolating the output into a templating system or something similar ๐ธ-pโ Print. prints the pattern. this is the default, BUT it's required when the-tswitch is enabled (because fr, if you just wanna test patterns you usually do not care what the the assembled pattern looks like) ๐-rโ Reduce. the default behaviour is to reduce the assembled pattern. turning this switch ON causes the reduction algorithm to be switched OFF. this is actually so helpful for figuring out how much reduction got performed:
regexp-assemble pattern.file | wc
# versus
regexp-assemble -r pattern.file | wc
-sโ Statistics. prints some statistics about the assembled pattern. the output goes toSTDERR(so that the generated pattern can still be redirected somewhere else). team player behavior ๐ซถ-Sโ Statistics only. like-s, except the pattern itself is not output. super useful with-d 8if you wanna see the time taken โฑ๏ธ-tโ Test. tests the assembled expression against the contents of a file. every line gets read from the file and matched against the pattern, and the lines that fail to match get printed. in other words: no output is good output. in this mode of operation, the error status is1in the case of a failure, and0if all lines matched ๐ญ-Tโ Time. prints statistics on the time taken to reduce and assemble the pattern. (this is merely a lazy person's synonym for-d 8) ๐-uโ Unique. carps if duplicate patterns are found ๐-Uโ Unroll. transformsa+et al intoaa*, which may allow additional reductions. glow-up via unrolling โจ-vโ Version. prints the version of theregexp-assemblescript ๐-wโ Word/Whole. when testing the contents of a file with-t, it brackets the expression with^and$so you match the whole word or line from the file ๐ฏ
๐ DIAGNOSTICS ๐
if an added pattern causes the assembly to fail, it will print out a summary of the problem. so like, it tells you what went wrong instead of just ghosting you ๐
๐ SEE ALSO ๐
Regexp::Assemble
๐ AUTHOR ๐
Copyright (C) 2004-2008 David Landgren. All rights reserved.
๐ฆ LICENSE ๐ฆ
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie, you ate ๐
okay so this was regexp-assemble from perl v5.36.0, dated 2022-12-04 โ go forth and assemble, queen ๐๐
๐ฆ where this page comes from
- debian bookworm: libregexp-assemble-perl 0.38-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libregexp-assemble-perl 0.38-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libregexp-assemble-perl 0.38-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libregexp-assemble-perl 0.38-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libregexp-assemble-perl 0.38-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms