The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::MathImage::Regexp::Common::OEIS -- regexps for some OEIS things

SYNOPSIS

 use Regexp::Common 'OEIS', 'no_defaults';
 if ($str =~ /$RE{OEIS}{anum}/) {
    # ...
 }

DESCRIPTION

Experimental ...

This module is regexps for some things related to Sloane's Online Encyclopedia of Integer Sequences

    http://oeis.org

See Regexp::Common for basic operation of Regexp::Common.

Patterns

$RE{OEIS}{anum}

Regexp for an OEIS A-number, either 6 or 7 digits

    A000040
    A0234567

The -keep option captures are

    $1    whole string "A000040"
    $2    number part "000040"

A minimum of 6 digits are required, so for example "A123" is not an A-number.

As of Nov 2013 there are about 230,000 A-numbers in use so 6 digits suffice. Rumour has it the plan is to go 7 digits when a million sequences is reached. The regexp here anticipates that.

SEE ALSO

Regexp::Common

HOME PAGE

http://user42.tuxfamily.org/math-image/index.html

LICENSE

Copyright 2012, 2013, 2014, 2017, 2019, 2020 Kevin Ryde

Math-Image is 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, or (at your option) any later version.

Math-Image 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 Math-Image. If not, see <http://www.gnu.org/licenses/>.