My Regex $Return = preg_replace('/(?<=,)[,\s]+/', ' ', $Return); What I supply gained their certificates: Intermediate, name, , , , .[Sources] [Notes] My Results gained their certificates: Intermediate, judith Todman, , , .[Sources] [Notes] What i expect gained their certificates: Intermediate, name.[Sources] [Notes]