#!/usr/bin/perl -w use strict; my $Prep_Re=join '|',('VAN DER','VAN DE','DEN','DE','VAN'); print "Name\t\tPrependition\t\tWhatever\n"; while () { chomp; s/\s{2,}/ /g; my ($Name,$Prep,$Unknown); ($Name,$Prep,$Unknown)=($`,$1,$') if (/ ($Prep_Re)/); ($Name,$Unknown)=($`,$1) if ((!$Name)&&(/ (\S*?$)/)); $Prep||=''; print "$Name\t\t$Prep\t\t$Unknown\n"; }; __DATA__ WINTER DE ZANDEN VAN DER ŤAť JENSEN 230 WOODHEAD BRINK 130,- HEYDIER DEN <240> SMITSER (4X115PJ) LINDEN VAN DER MOTEL GOLDEN LEEUW