regex-common

Common regular expressions used with Perl.

About

Forked project!

This project is a fork from Regexp::Common.

Looks like the original project is not being maintained anymore. This module is intended to be executed on modern perl versions, so new features provides by them are expected to be in place too.

See the dist.ini file to check what versions of perl are supported.

The details

By default, this module exports a single hash (%RE) that stores or generates commonly needed regular expressions. Patterns currently provided include:

Future releases of the module will also provide patterns for the following:

How to use it

while (<>) {
/$RE{num}{real}/
and print q{a number\n};
/$RE{quoted}/
and print q{a ['"`] quoted string\n};
/$RE{delimited}{-delim=>'/'}/
and print q{a /.../ sequence\n};
/$RE{balanced}{-parens=>'()'}/
and print q{balanced parentheses\n};
/$RE{profanity}/
and print q{a #*@%-ing word\n};
}

To do

License

This software is copyright (c) 2024 of Alceu Rodrigues de Freitas Junior, glasswalk3r at yahoo.com.br

This file is part of regex-common project.

regex-commonis free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

regex-common is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with regex-common. If not, see (http://www.gnu.org/licenses/).

The original project Regexp::Common is licensed through the MIT License, copyright (c) Damian Conway (damian@cs.monash.edu.au) and Abigail (regexp-common@abigail.be).