#!/usr/bin/perl -w

use strict;
use warnings;

while (<DATA>) {
    chomp;

    # A - A sequence of digits
    # B - A period and a sequence of digits
    # C - Repeat 'B'.

    if (/\b(\d+)((?:\.\d+)+)\b/) {
#           ^^^     ^^^^^
#            A        B
#                   ^^^^^^^
#                      C

        print "[$1]  [$2]\n";
    }
}

__END__
1.23
123.456
1.2.3
1.22.333.444
