use strict; use warnings; my $in_string = "Apples Orances:5433 55552246:777449 Country 457852/total" . " " . "Apples Red:9987 green:777449 Public 74585/total" . "\n" ; my @totals = $in_string =~ m{ (\d{5}) (?= /total ) }gx; print "@totals\n";
In reply to Re: extract the value before a particualr string
by BillKSmith
in thread extract the value before a particualr string
by nanban
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |