Of course, there are tons of ways to handle this problem. =)#!/usr/bin/perl ########################################### use warnings; use strict; my $test = "000000000000022102840002210284"; if ( $test =~ /^(\d{10})(\d{10})(\d{10})$/ ){ print "1 = $1\n2 = $2\n3 = $3\n"; } else { print STDERR "Bad 30-digit number!$/"; }
In reply to Re^2: Regexp to extract groups of numbers
by meredith
in thread Regexp to extract groups of numbers
by neilh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |