in reply to Help with pattern matching quantifiers

Just regex for what you want...

#!/usr/bin/perl # http://perlmonks.org/?node_id=1174610 use strict; use warnings; while(<DATA>) { my @values = /-?\d+/g; print "@values\n"; } __DATA__ -8-18 -9-10 -8 -7 -9-10 -9 -6 -5 -8 12 -7-10 -8 -8 -8 -8 -6 -3 2 2 -2 -8 1 -2 -5 -1 -4 -6 6 -4 -6 -5 -1 0 -8 -6 -6 3 -6 -3 -6 -2 -5 -5 -5 -4 4 -3 -2 -2 -3 -5 1 3 -7 -4 3 1 -6 -5 -6 4 -5 -6 -5 -6 3 1 -5 -3 -2 -5 -1 3 -4 -3 4 2 -8 -6 -7 -8 -8 -8 7 -8 -9 -9 -7 -8 -6 -8 -4 -7 -9 -9 -8

Replies are listed 'Best First'.
Re^2: Help with pattern matching quantifiers
by Anonymous Monk on Oct 24, 2016 at 18:22 UTC
    Ah damn, I missed that!
    But thanks a lot!