in reply to Re^2: Extraction of numbers in an string
in thread Extraction of numbers in an string
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extraction of numbers in an string
by Not_a_Number (Prior) on Nov 25, 2016 at 20:20 UTC | |
by tybalt89 (Monsignor) on Nov 25, 2016 at 20:47 UTC | |
by AnomalousMonk (Archbishop) on Nov 25, 2016 at 20:50 UTC | |
|
Re^4: Extraction of numbers in an string
by AnomalousMonk (Archbishop) on Nov 25, 2016 at 20:52 UTC |