http://www.perlmonks.org?node_id=1004779


in reply to Array Filter and Lookahead

Here's another option:

my @test_filtered = map { (/(\d+)[\d.]*/g)[-1] // '' } @test;

Update: changed to // to handle 0s. Thanks again, AnomalousMonk.