.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Regexp::Common 3pm" .TH Regexp::Common 3pm "2017-06-17" "perl v5.24.1" "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::Common \- Provide commonly requested regular expressions .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # STANDARD USAGE \& \& use Regexp::Common; \& \& while (<>) { \& /$RE{num}{real}/ and print q{a number}; \& /$RE{quoted}/ and print q{a [\*(Aq"\`] quoted string}; \& m[$RE{delimited}{\-delim=>\*(Aq/\*(Aq}] and print q{a /.../ sequence}; \& /$RE{balanced}{\-parens=>\*(Aq()\*(Aq}/ and print q{balanced parentheses}; \& /$RE{profanity}/ and print q{a #*@%\-ing word}; \& } \& \& \& # SUBROUTINE\-BASED INTERFACE \& \& use Regexp::Common \*(AqRE_ALL\*(Aq; \& \& while (<>) { \& $_ =~ RE_num_real() and print q{a number}; \& $_ =~ RE_quoted() and print q{a [\*(Aq"\`] quoted string}; \& $_ =~ RE_delimited(\-delim=>\*(Aq/\*(Aq) and print q{a /.../ sequence}; \& $_ =~ RE_balanced(\-parens=>\*(Aq()\*(Aq} and print q{balanced parentheses}; \& $_ =~ RE_profanity() and print q{a #*@%\-ing word}; \& } \& \& \& # IN\-LINE MATCHING... \& \& if ( $RE{num}{int}\->matches($text) ) {...} \& \& \& # ...AND SUBSTITUTION \& \& my $cropped = $RE{ws}{crop}\->subs($uncropped); \& \& \& # ROLL\-YOUR\-OWN PATTERNS \& \& use Regexp::Common \*(Aqpattern\*(Aq; \& \& pattern name => [\*(Aqname\*(Aq, \*(Aqmine\*(Aq], \& create => \*(Aq(?i:J[.]?\es+A[.]?\es+Perl\-Hacker)\*(Aq, \& ; \& \& my $name_matcher = $RE{name}{mine}; \& \& pattern name => [ \*(Aqlineof\*(Aq, \*(Aq\-char=_\*(Aq ], \& create => sub { \& my $flags = shift; \& my $char = quotemeta $flags\->{\-char}; \& return \*(Aq(?:^$char+$)\*(Aq; \& }, \& match => sub { \& my ($self, $str) = @_; \& return $str !~ /[^$self\->{flags}{\-char}]/; \& }, \& subs => sub { \& my ($self, $str, $replacement) = @_; \& $_[1] =~ s/^$self\->{flags}{\-char}+$//g; \& }, \& ; \& \& my $asterisks = $RE{lineof}{\-char=>\*(Aq*\*(Aq}; \& \& # DECIDING WHICH PATTERNS TO LOAD. \& \& use Regexp::Common qw /comment number/; # Comment and number patterns. \& use Regexp::Common qw /no_defaults/; # Don\*(Aqt load any patterns. \& use Regexp::Common qw /!delimited/; # All, but delimited patterns. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" By default, this module exports a single hash (\f(CW%RE\fR) that stores or generates commonly needed regular expressions (see \*(L"List of available patterns\*(R"). .PP There is an alternative, subroutine-based syntax described in \&\*(L"Subroutine-based interface\*(R". .SS "General syntax for requesting patterns" .IX Subsection "General syntax for requesting patterns" To access a particular pattern, \f(CW%RE\fR is treated as a hierarchical hash of hashes (of hashes...), with each successive key being an identifier. For example, to access the pattern that matches real numbers, you specify: .PP .Vb 1 \& $RE{num}{real} .Ve .PP and to access the pattern that matches integers: .PP .Vb 1 \& $RE{num}{int} .Ve .PP Deeper layers of the hash are used to specify \fIflags\fR: arguments that modify the resulting pattern in some way. The keys used to access these layers are prefixed with a minus sign and may have a value; if a value is given, it's done by using a multidimensional key. For example, to access the pattern that matches base\-2 real numbers with embedded commas separating groups of three digits (e.g. 10,101,110.110101101): .PP .Vb 1 \& $RE{num}{real}{\-base => 2}{\-sep => \*(Aq,\*(Aq}{\-group => 3} .Ve .PP Through the magic of Perl, these flag layers may be specified in any order (and even interspersed through the identifier keys!) so you could get the same pattern with: .PP .Vb 1 \& $RE{num}{real}{\-sep => \*(Aq,\*(Aq}{\-group => 3}{\-base => 2} .Ve .PP or: .PP .Vb 1 \& $RE{num}{\-base => 2}{real}{\-group => 3}{\-sep => \*(Aq,\*(Aq} .Ve .PP or even: .PP .Vb 1 \& $RE{\-base => 2}{\-group => 3}{\-sep => \*(Aq,\*(Aq}{num}{real} .Ve .PP etc. .PP Note, however, that the relative order of amongst the identifier keys \&\fIis\fR significant. That is: .PP .Vb 1 \& $RE{list}{set} .Ve .PP would not be the same as: .PP .Vb 1 \& $RE{set}{list} .Ve .SS "Flag syntax" .IX Subsection "Flag syntax" In versions prior to 2.113, flags could also be written as \&\f(CW\*(C`{"\-flag=value"}\*(C'\fR. This no longer works, although \f(CW\*(C`{"\-flag$;value"}\*(C'\fR still does. However, \f(CW\*(C`{\-flag => \*(Aqvalue\*(Aq}\*(C'\fR is the preferred syntax. .SS "Universal flags" .IX Subsection "Universal flags" Normally, flags are specific to a single pattern. However, there is two flags that all patterns may specify. .ie n .IP """\-keep""" 4 .el .IP "\f(CW\-keep\fR" 4 .IX Item "-keep" By default, the patterns provided by \f(CW%RE\fR contain no capturing parentheses. However, if the \f(CW\*(C`\-keep\*(C'\fR flag is specified (it requires no value) then any significant substrings that the pattern matches are captured. For example: .Sp .Vb 5 \& if ($str =~ $RE{num}{real}{\-keep}) { \& $number = $1; \& $whole = $3; \& $decimals = $5; \& } .Ve .Sp Special care is needed if a \*(L"kept\*(R" pattern is interpolated into a larger regular expression, as the presence of other capturing parentheses is likely to change the \*(L"number variables\*(R" into which significant substrings are saved. .Sp See also \*(L"Adding new regular expressions\*(R", which describes how to create new patterns with \*(L"optional\*(R" capturing brackets that respond to \f(CW\*(C`\-keep\*(C'\fR. .ie n .IP """\-i""" 4 .el .IP "\f(CW\-i\fR" 4 .IX Item "-i" Some patterns or subpatterns only match lowercase or uppercase letters. If one wants the do case insensitive matching, one option is to use the \f(CW\*(C`/i\*(C'\fR regexp modifier, or the special sequence \f(CW\*(C`(?i)\*(C'\fR. But if the functional interface is used, one does not have this option. The \&\f(CW\*(C`\-i\*(C'\fR switch solves this problem; by using it, the pattern will do case insensitive matching. .SS "\s-1OO\s0 interface and inline matching/substitution" .IX Subsection "OO interface and inline matching/substitution" The patterns returned from \f(CW%RE\fR are objects, so rather than writing: .PP .Vb 1 \& if ($str =~ /$RE{some}{pattern}/ ) {...} .Ve .PP you can write: .PP .Vb 1 \& if ( $RE{some}{pattern}\->matches($str) ) {...} .Ve .PP For matching this would seem to have no great advantage apart from readability (but see below). .PP For substitutions, it has other significant benefits. Frequently you want to perform a substitution on a string without changing the original. Most people use this: .PP .Vb 2 \& $changed = $original; \& $changed =~ s/$RE{some}{pattern}/$replacement/; .Ve .PP The more adept use: .PP .Vb 1 \& ($changed = $original) =~ s/$RE{some}{pattern}/$replacement/; .Ve .PP Regexp::Common allows you do write this: .PP .Vb 1 \& $changed = $RE{some}{pattern}\->subs($original=>$replacement); .Ve .PP Apart from reducing precedence-angst, this approach has the added advantages that the substitution behaviour can be optimized from the regular expression, and the replacement string can be provided by default (see \*(L"Adding new regular expressions\*(R"). .PP For example, in the implementation of this substitution: .PP .Vb 1 \& $cropped = $RE{ws}{crop}\->subs($uncropped); .Ve .PP the default empty string is provided automatically, and the substitution is optimized to use: .PP .Vb 2 \& $uncropped =~ s/^\es+//; \& $uncropped =~ s/\es+$//; .Ve .PP rather than: .PP .Vb 1 \& $uncropped =~ s/^\es+|\es+$//g; .Ve .SS "Subroutine-based interface" .IX Subsection "Subroutine-based interface" The hash-based interface was chosen because it allows regexes to be effortlessly interpolated, and because it also allows them to be \&\*(L"curried\*(R". For example: .PP .Vb 1 \& my $num = $RE{num}{int}; \& \& my $commad = $num\->{\-sep=>\*(Aq,\*(Aq}{\-group=>3}; \& my $duodecimal = $num\->{\-base=>12}; .Ve .PP However, the use of tied hashes does make the access to Regexp::Common patterns slower than it might otherwise be. In contexts where impatience overrules laziness, Regexp::Common provides an additional subroutine-based interface. .PP For each (sub\-)entry in the \f(CW%RE\fR hash (\f(CW$RE{key1}{key2}{etc}\fR), there is a corresponding exportable subroutine: \f(CW\*(C`RE_key1_key2_etc()\*(C'\fR. The name of each subroutine is the underscore-separated concatenation of the \fInon-flag\fR keys that locate the same pattern in \f(CW%RE\fR. Flags are passed to the subroutine in its argument list. Thus: .PP .Vb 1 \& use Regexp::Common qw( RE_ws_crop RE_num_real RE_profanity ); \& \& $str =~ RE_ws_crop() and die "Surrounded by whitespace"; \& \& $str =~ RE_num_real(\-base=>8, \-sep=>" ") or next; \& \& $offensive = RE_profanity(\-keep); \& $str =~ s/$offensive/$bad{$1}++; ""/ge; .Ve .PP Note that, unlike the hash-based interface (which returns objects), these subroutines return ordinary \f(CW\*(C`qr\*(C'\fR'd regular expressions. Hence they do not curry, nor do they provide the \s-1OO\s0 match and substitution inlining described in the previous section. .PP It is also possible to export subroutines for all available patterns like so: .PP .Vb 1 \& use Regexp::Common \*(AqRE_ALL\*(Aq; .Ve .PP Or you can export all subroutines with a common prefix of keys like so: .PP .Vb 1 \& use Regexp::Common \*(AqRE_num_ALL\*(Aq; .Ve .PP which will export \f(CW\*(C`RE_num_int\*(C'\fR and \f(CW\*(C`RE_num_real\*(C'\fR (and if you have create more patterns who have first key \fInum\fR, those will be exported as well). In general, \fIRE_key1_..._keyn_ALL\fR will export all subroutines whose pattern names have first keys \fIkey1\fR ... \fIkeyn\fR. .SS "Adding new regular expressions" .IX Subsection "Adding new regular expressions" You can add your own regular expressions to the \f(CW%RE\fR hash at run-time, using the exportable \f(CW\*(C`pattern\*(C'\fR subroutine. It expects a hash-like list of key/value pairs that specify the behaviour of the pattern. The various possible argument pairs are: .ie n .IP """name => [ @list ]""" 4 .el .IP "\f(CWname => [ @list ]\fR" 4 .IX Item "name => [ @list ]" A required argument that specifies the name of the pattern, and any flags it may take, via a reference to a list of strings. For example: .Sp .Vb 3 \& pattern name => [qw( line of \-char )], \& # other args here \& ; .Ve .Sp This specifies an entry \f(CW$RE{line}{of}\fR, which may take a \f(CW\*(C`\-char\*(C'\fR flag. .Sp Flags may also be specified with a default value, which is then used whenever the flag is specified without an explicit value (but not when the flag is omitted). For example: .Sp .Vb 4 \& pattern name => [qw( line of \-char=_ )], \& # default char is \*(Aq_\*(Aq \& # other args here \& ; .Ve .ie n .IP """create => $sub_ref_or_string""" 4 .el .IP "\f(CWcreate => $sub_ref_or_string\fR" 4 .IX Item "create => $sub_ref_or_string" A required argument that specifies either a string that is to be returned as the pattern: .Sp .Vb 3 \& pattern name => [qw( line of underscores )], \& create => q/(?:^_+$)/ \& ; .Ve .Sp or a reference to a subroutine that will be called to create the pattern: .Sp .Vb 7 \& pattern name => [qw( line of \-char=_ )], \& create => sub { \& my ($self, $flags) = @_; \& my $char = quotemeta $flags\->{\-char}; \& return \*(Aq(?:^$char+$)\*(Aq; \& }, \& ; .Ve .Sp If the subroutine version is used, the subroutine will be called with three arguments: a reference to the pattern object itself, a reference to a hash containing the flags and their values, and a reference to an array containing the non-flag keys. .Sp Whatever the subroutine returns is stringified as the pattern. .Sp No matter how the pattern is created, it is immediately postprocessed to include or exclude capturing parentheses (according to the value of the \&\f(CW\*(C`\-keep\*(C'\fR flag). To specify such \*(L"optional\*(R" capturing parentheses within the regular expression associated with \f(CW\*(C`create\*(C'\fR, use the notation \&\f(CW\*(C`(?k:...)\*(C'\fR. Any parentheses of this type will be converted to \f(CW\*(C`(...)\*(C'\fR when the \f(CW\*(C`\-keep\*(C'\fR flag is specified, or \f(CW\*(C`(?:...)\*(C'\fR when it is not. It is a Regexp::Common convention that the outermost capturing parentheses always capture the entire pattern, but this is not enforced. .ie n .IP """match => $sub_ref""" 4 .el .IP "\f(CWmatch => $sub_ref\fR" 4 .IX Item "match => $sub_ref" An optional argument that specifies a subroutine that is to be called when the \f(CW\*(C`$RE{...}\->matches(...)\*(C'\fR method of this pattern is invoked. .Sp The subroutine should expect two arguments: a reference to the pattern object itself, and the string to be matched against. .Sp It should return the same types of values as a \f(CW\*(C`m/.../\*(C'\fR does. .Sp .Vb 7 \& pattern name => [qw( line of \-char )], \& create => sub {...}, \& match => sub { \& my ($self, $str) = @_; \& $str !~ /[^$self\->{flags}{\-char}]/; \& }, \& ; .Ve .ie n .IP """subs => $sub_ref""" 4 .el .IP "\f(CWsubs => $sub_ref\fR" 4 .IX Item "subs => $sub_ref" An optional argument that specifies a subroutine that is to be called when the \f(CW\*(C`$RE{...}\->subs(...)\*(C'\fR method of this pattern is invoked. .Sp The subroutine should expect three arguments: a reference to the pattern object itself, the string to be changed, and the value to be substituted into it. The third argument may be \f(CW\*(C`undef\*(C'\fR, indicating the default substitution is required. .Sp The subroutine should return the same types of values as an \f(CW\*(C`s/.../.../\*(C'\fR does. .Sp For example: .Sp .Vb 7 \& pattern name => [ \*(Aqlineof\*(Aq, \*(Aq\-char=_\*(Aq ], \& create => sub {...}, \& subs => sub { \& my ($self, $str, $ignore_replacement) = @_; \& $_[1] =~ s/^$self\->{flags}{\-char}+$//g; \& }, \& ; .Ve .Sp Note that such a subroutine will almost always need to modify \f(CW$_[1]\fR directly. .ie n .IP """version => $minimum_perl_version""" 4 .el .IP "\f(CWversion => $minimum_perl_version\fR" 4 .IX Item "version => $minimum_perl_version" If this argument is given, it specifies the minimum version of perl required to use the new pattern. Attempts to use the pattern with earlier versions of perl will generate a fatal diagnostic. .SS "Loading specific sets of patterns." .IX Subsection "Loading specific sets of patterns." By default, all the sets of patterns listed below are made available. However, it is possible to indicate which sets of patterns should be made available \- the wanted sets should be given as arguments to \&\f(CW\*(C`use\*(C'\fR. Alternatively, it is also possible to indicate which sets of patterns should not be made available \- those sets will be given as argument to the \f(CW\*(C`use\*(C'\fR statement, but are preceded with an exclaimation mark. The argument \fIno_defaults\fR indicates none of the default patterns should be made available. This is useful for instance if all you want is the \f(CW\*(C`pattern()\*(C'\fR subroutine. .PP Examples: .PP .Vb 3 \& use Regexp::Common qw /comment number/; # Comment and number patterns. \& use Regexp::Common qw /no_defaults/; # Don\*(Aqt load any patterns. \& use Regexp::Common qw /!delimited/; # All, but delimited patterns. .Ve .PP It's also possible to load your own set of patterns. If you have a module \f(CW\*(C`Regexp::Common::my_patterns\*(C'\fR that makes patterns available, you can have it made available with .PP .Vb 1 \& use Regexp::Common qw /my_patterns/; .Ve .PP Note that the default patterns will still be made available \- only if you use \fIno_defaults\fR, or mention one of the default sets explicitly, the non mentioned defaults aren't made available. .SS "List of available patterns" .IX Subsection "List of available patterns" The patterns listed below are currently available. Each set of patterns has its own manual page describing the details. For each pattern set named \fIname\fR, the manual page \fIRegexp::Common::name\fR describes the details. .PP Currently available are: .IP "Regexp::Common::balanced" 4 .IX Item "Regexp::Common::balanced" Provides regexes for strings with balanced parenthesized delimiters. .IP "Regexp::Common::comment" 4 .IX Item "Regexp::Common::comment" Provides regexes for comments of various languages (43 languages currently). .IP "Regexp::Common::delimited" 4 .IX Item "Regexp::Common::delimited" Provides regexes for delimited strings. .IP "Regexp::Common::lingua" 4 .IX Item "Regexp::Common::lingua" Provides regexes for palindromes. .IP "Regexp::Common::list" 4 .IX Item "Regexp::Common::list" Provides regexes for lists. .IP "Regexp::Common::net" 4 .IX Item "Regexp::Common::net" Provides regexes for IPv4, IPv6, and \s-1MAC\s0 addresses. .IP "Regexp::Common::number" 4 .IX Item "Regexp::Common::number" Provides regexes for numbers (integers and reals). .IP "Regexp::Common::profanity" 4 .IX Item "Regexp::Common::profanity" Provides regexes for profanity. .IP "Regexp::Common::whitespace" 4 .IX Item "Regexp::Common::whitespace" Provides regexes for leading and trailing whitespace. .IP "Regexp::Common::zip" 4 .IX Item "Regexp::Common::zip" Provides regexes for zip codes. .SS "Forthcoming patterns and features" .IX Subsection "Forthcoming patterns and features" Future releases of the module will also provide patterns for the following: .PP .Vb 9 \& * email addresses \& * HTML/XML tags \& * more numerical matchers, \& * mail headers (including multiline ones), \& * more URLS \& * telephone numbers of various countries \& * currency (universal 3 letter format, Latin\-1, currency names) \& * dates \& * binary formats (e.g. UUencoded, MIMEd) .Ve .PP If you have other patterns or pattern generators that you think would be generally useful, please send them to the maintainer \*(-- preferably as source code using the \f(CW\*(C`pattern\*(C'\fR subroutine. Submissions that include a set of tests will be especially welcome. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .ie n .IP """Can\*(Aqt export unknown subroutine %s""" 4 .el .IP "\f(CWCan\*(Aqt export unknown subroutine %s\fR" 4 .IX Item "Cant export unknown subroutine %s" The subroutine-based interface didn't recognize the requested subroutine. Often caused by a spelling mistake or an incompletely specified name. .ie n .IP """Can\*(Aqt create unknown regex: $RE{...}""" 4 .el .IP "\f(CWCan\*(Aqt create unknown regex: $RE{...}\fR" 4 .IX Item "Cant create unknown regex: $RE{...}" Regexp::Common doesn't have a generator for the requested pattern. Often indicates a misspelt or missing parameter. .ie n .IP " ""Perl %f does not support the pattern $RE{...}. You need Perl %f or later""" 4 .el .IP " \f(CWPerl %f does not support the pattern $RE{...}. You need Perl %f or later\fR" 4 .IX Item " Perl %f does not support the pattern $RE{...}. You need Perl %f or later" The requested pattern requires advanced regex features (e.g. recursion) that not available in your version of Perl. Time to upgrade. .ie n .IP """pattern() requires argument: name => [ @list ]""" 4 .el .IP "\f(CWpattern() requires argument: name => [ @list ]\fR" 4 .IX Item "pattern() requires argument: name => [ @list ]" Every user-defined pattern specification must have a name. .ie n .IP """pattern() requires argument: create => $sub_ref_or_string""" 4 .el .IP "\f(CWpattern() requires argument: create => $sub_ref_or_string\fR" 4 .IX Item "pattern() requires argument: create => $sub_ref_or_string" Every user-defined pattern specification must provide a pattern creation mechanism: either a pattern string or a reference to a subroutine that returns the pattern string. .ie n .IP """Base must be between 1 and 36""" 4 .el .IP "\f(CWBase must be between 1 and 36\fR" 4 .IX Item "Base must be between 1 and 36" The \f(CW$RE{num}{real}{\-base=>\*(Aq\f(CIN\f(CW\*(Aq}\fR pattern uses the characters [0\-9A\-Z] to represent the digits of various bases. Hence it only produces regular expressions for bases up to hexatricensimal. .ie n .IP """Must specify delimiter in $RE{delimited}""" 4 .el .IP "\f(CWMust specify delimiter in $RE{delimited}\fR" 4 .IX Item "Must specify delimiter in $RE{delimited}" The pattern has no default delimiter. You need to write: \f(CW$RE{delimited}{\-delim=>\f(CIX\f(CW\*(Aq}\fR for some character \fIX\fR .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Deepest thanks to the many people who have encouraged and contributed to this project, especially: Elijah, Jarkko, Tom, Nat, Ed, and Vivek. .PP Further thanks go to: Alexandr Ciornii, Blair Zajac, Bob Stockdale, Charles Thomas, Chris Vertonghen, the \s-1CPAN\s0 Testers, David Hand, Fany, Geoffrey Leach, Hermann-Marcus Behrens, Jerome Quelin, Jim Cromie, Lars Wilke, Linda Julien, Mike Arms, Mike Castle, Mikko, Murat Uenalan, Rafaƫl Garcia-Suarez, Ron Savage, Sam Vilain, Slaven Rezic, Smylers, Tim Maher, and all the others I've forgotten. .SH "AUTHOR" .IX Header "AUTHOR" Damian Conway (damian@conway.org) .SH "MAINTENANCE" .IX Header "MAINTENANCE" This package is maintained by Abigail (\fIregexp\-common@abigail.be\fR). .SH "BUGS AND IRRITATIONS" .IX Header "BUGS AND IRRITATIONS" Bound to be plenty. .PP For a start, there are many common regexes missing. Send them in to \fIregexp\-common@abigail.be\fR. .PP There are some \s-1POD\s0 issues when installing this module using a pre\-5.6.0 perl; some manual pages may not install, or may not install correctly using a perl that is that old. You might consider upgrading your perl. .SH "NOT A BUG" .IX Header "NOT A BUG" .IP "\(bu" 4 The various patterns are not anchored. That is, a pattern like \&\f(CW\*(C`$RE {num} {int}\*(C'\fR will match against \*(L"abc4def\*(R", because a substring of the subject matches. This is by design, and not a bug. If you want the pattern to be anchored, use something like: .Sp .Vb 2 \& my $integer = $RE {num} {int}; \& $subj =~ /^$integer$/ and print "Matches!\en"; .Ve .SH "LICENSE and COPYRIGHT" .IX Header "LICENSE and COPYRIGHT" This software is Copyright (c) 2001 \- 2017, Damian Conway and Abigail. .PP This module is free software, and maybe used under any of the following licenses: .PP .Vb 4 \& 1) The Perl Artistic License. See the file COPYRIGHT.AL. \& 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. \& 3) The BSD License. See the file COPYRIGHT.BSD. \& 4) The MIT License. See the file COPYRIGHT.MIT. .Ve