in reply to regex question

It's simple: split that line wherever there is a colon or semicolon followed by space -- just to be safe, we'll accept one or more whitespace characters of any kind:
my $fontline = "font-family: Verdana, Arial, Geneva, san-serif; font-s +ize: .69em; color: #666666"; my @components = split /[:;]\s+/, $fontline; print join "\n", "", @components, ""; print "\n or, as a hash:\n"; %components = @components; print "$_ => $components{$_}\n" for ( keys %components ); __OUTPUT__ font-family Verdana, Arial, Geneva, san-serif font-size .69em color #666666 or, as a hash: font-family => Verdana, Arial, Geneva, san-serif font-size => .69em color => #666666