Regexp::Pattern::Int - Regexp patterns related to integers
This document describes version 0.001 of Regexp::Pattern::Int (from Perl distribution Regexp-Pattern-Int), released on 2020-05-27.
use Regexp::Pattern; # exports re() my $re = re("Int::int");
Regexp::Pattern is a convention for organizing reusable regex patterns.
int
Integer number.
Examples:
"" =~ re("Int::int"); # DOESN'T MATCH 123 =~ re("Int::int"); # matches "+123" =~ re("Int::int"); # matches -123 =~ re("Int::int"); # matches 123.1 =~ re("Int::int"); # DOESN'T MATCH "1e2" =~ re("Int::int"); # DOESN'T MATCH
negint
Negative integer number.
"" =~ re("Int::negint"); # DOESN'T MATCH 0 =~ re("Int::negint"); # DOESN'T MATCH "+0" =~ re("Int::negint"); # DOESN'T MATCH "-0" =~ re("Int::negint"); # DOESN'T MATCH 123 =~ re("Int::negint"); # DOESN'T MATCH "+123" =~ re("Int::negint"); # DOESN'T MATCH -1 =~ re("Int::negint"); # matches -123 =~ re("Int::negint"); # matches -123.1 =~ re("Int::negint"); # DOESN'T MATCH "-1e2" =~ re("Int::negint"); # DOESN'T MATCH
posint
Positive integer number.
"" =~ re("Int::posint"); # DOESN'T MATCH 0 =~ re("Int::posint"); # DOESN'T MATCH "+0" =~ re("Int::posint"); # DOESN'T MATCH "-0" =~ re("Int::posint"); # DOESN'T MATCH 1 =~ re("Int::posint"); # matches 123 =~ re("Int::posint"); # matches "+123" =~ re("Int::posint"); # matches -1 =~ re("Int::posint"); # DOESN'T MATCH -123 =~ re("Int::posint"); # DOESN'T MATCH 123.1 =~ re("Int::posint"); # DOESN'T MATCH "1e2" =~ re("Int::posint"); # DOESN'T MATCH
uint
Non-negative integer number.
"" =~ re("Int::uint"); # DOESN'T MATCH 0 =~ re("Int::uint"); # matches "+0" =~ re("Int::uint"); # matches "-0" =~ re("Int::uint"); # DOESN'T MATCH 123 =~ re("Int::uint"); # matches "+123" =~ re("Int::uint"); # matches -123 =~ re("Int::uint"); # DOESN'T MATCH 123.1 =~ re("Int::uint"); # DOESN'T MATCH "1e2" =~ re("Int::uint"); # DOESN'T MATCH
Please visit the project's homepage at https://metacpan.org/release/Regexp-Pattern-Int.
Source repository is at https://github.com/perlancar/perl-Regexp-Pattern-Int.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Regexp-Pattern-Int
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Regexp::Pattern::Float
Sah::Schema::uint, Sah::Schema::negint, Sah::Schema::negint,
Regexp::Pattern
Some utilities related to Regexp::Pattern: App::RegexpPatternUtils, rpgrep from App::rpgrep.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Regexp::Pattern::Int, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Regexp::Pattern::Int
CPAN shell
perl -MCPAN -e shell install Regexp::Pattern::Int
For more information on module installation, please visit the detailed CPAN module installation guide.