#!/usr/bin/perl -w use strict; my $var = "xxx:12345 yyy:54321 zzz:13245"; my @items = split /:\S+\s*/, $var; print"@items\n"; __END__ xxx yyy zzz