my ($foo) = $string =~ /(.*?) *(?=string)/;