substr rep with substr_replace to rm | & add /