1) Copied list into text editor 2) Regex replace: From: ^*([^]*)([^]*)([^]*)([^]*)([^]*)*$ To: array("text" => "\1", "two-digit" => "\2", "three-digit" => "\3", "number" => "\4", "dialing code" => "\5"),