$_ = '/usr/local/www/"something/other"/"This file/data thing.cfg"'; print "$1\n" if /.+\/(\w+)\//; www