# one poor decision $_ = 'mike miky [mike [-( at )-] mike.bla]'; /(\w+) \W+ at \W+ (\w+(?:\.\w+)+)/i; print "$1\@$2" # prints mike@mike.bla