.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "REGEXP-ASSEMBLE 1p" .TH REGEXP-ASSEMBLE 1p "2022-12-04" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" regexp\-assemble \- Assemble a list of regular expressions from a file .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& regexp\-assemble \-abcdfinprsStTuUvw file [...] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Assemble a list of regular expression either from standard input or a file, using the Regexp::Assemble module. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-a\fR" 5 .IX Item "-a" look Ahead. Insert \f(CW\*(C`(?=...)\*(C'\fR zero-width lookahead assertions in the pattern, where necessary. .IP "\fB\-b\fR" 5 .IX Item "-b" Blank. Ignore blank lines. .IP "\fB\-c\fR" 5 .IX Item "-c" Comment. Basic comment filtering. Strip off perl/shell comments (\f(CW\*(C`\es*#.*$/\*(C'\fR). .IP "\fB\-d\fR" 5 .IX Item "-d" Debug. Turns on debugging output. See Regexp::Assemble for suitable values. .IP "\fB\-i\fR" 5 .IX Item "-i" Indent. Print the regular expression using and indent of n to display nesting. A.k.a pretty-printing. Implies \-p. .IP "\fB\-n\fR" 5 .IX Item "-n" No newline. Do not print a newline after the pattern. Useful when interpolating the output into a templating system or similar. .IP "\fB\-p\fR" 5 .IX Item "-p" Print. Print the pattern. This is the default, however, it is required when the \-t switch is enabled (because if you want to test patterns ordinarily you don't care what the the assembled pattern looks like). .IP "\fB\-r\fR" 5 .IX Item "-r" Reduce. The default behaviour is to reduce the assembled pattern. Enabling this switch causes the reduction algorithm to be switched off. This can help you determine how much reduction is performed. .Sp .Vb 3 \& regexp\-assemble pattern.file | wc \& # versus \& regexp\-assemble \-r pattern.file | wc .Ve .IP "\fB\-s\fR" 5 .IX Item "-s" Statistics. Print some statistics about the assembled pattern. The output is sent to \s-1STDERR\s0 (in order to allow the generated pattern to be redirected elsewhere). .IP "\fB\-S\fR" 5 .IX Item "-S" Statistics only. Like \fB\-s\fR, except that the pattern itself is not output. Useful with \fB\-d 8\fR to see the time taken. .IP "\fB\-t\fR" 5 .IX Item "-t" Test. Test the assembled expression against the contents of a file. Each line is read from the file and is matched against the pattern. Lines that fail to match are printed. In other words, no output is good output. In this mode of operation, error status is 1 in the case of a failure, 0 if all lines matched. .IP "\fB\-T\fR" 5 .IX Item "-T" Time. Print statistics on the time taken to reduce and assemble the pattern. (This is merely a lazy person's synonym for \f(CW\*(C`\-d 8\*(C'\fR). .IP "\fB\-u\fR" 5 .IX Item "-u" Unique. Carp if duplicate patterns are found. .IP "\fB\-U\fR" 5 .IX Item "-U" Unroll. Transform \f(CW\*(C`a+\*(C'\fR \fIet al\fR into \f(CW\*(C`aa*\*(C'\fR (which may allow additional reductions). .IP "\fB\-v\fR" 5 .IX Item "-v" Version. Print the version of the regexp-assemble script. .IP "\fB\-w\fR" 5 .IX Item "-w" Word/Whole. When testing the contents of a file with \f(CW\*(C`\-t\*(C'\fR, bracket the expression with \f(CW\*(C`^\*(C'\fR and \f(CW\*(C`$\*(C'\fR in order to match the whole word or line from the file. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" Will print out a summary of the problem if an added pattern causes the assembly to fail. .SH "SEE ALSO" .IX Header "SEE ALSO" Regexp::Assemble .SH "AUTHOR" .IX Header "AUTHOR" Copyright (C) 2004\-2008 David Landgren. All rights reserved. .SH "LICENSE" .IX Header "LICENSE" This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.