Still fairly simple with split:
#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1176478 use strict; use warnings; my $string = '<1,22>:<5,7>:<333,0>'; my @x = grep /\d/, split /\D+/, $string; print for @x;
In reply to Re^3: Extraction of numbers in an string
by tybalt89
in thread Extraction of numbers in an string
by t-rex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |