Changed explode for preg_split to avoid problems with multiple delimiters.