Modified string stripper to remove doubled strings