in reply to Regex for matching dotted numbers

This doesn't necessarily have to be done on a regex...
my @ver = split /\./, $verstring;
And test for whatever you wish there.

Replies are listed 'Best First'.
Re^2: Regex for matching dotted numbers
by techman2006 (Beadle) on Jul 21, 2014 at 16:33 UTC

    I have done on similar line as the pattern was not consistent as I was thinking.

      Your supplied test data doesn't suggest this. If it's not 3 or 4 numbers separated by a dot, what is it? If it is separated by a dot, you can check scalar(@ver) to see if it's 3 or 4 numbers, and check $ver[0] to get your major number, and continue from there. You could even use one of the many switch analogs from CPAN to implement switch statements on the version numbers.