() Jonathan Ganc () Mon, 10 Apr 2017 00:41:15 -0400 + (while (string-match "\\(..\\) [^\0]+\0" status next-match) + (push (match-string 1 status) code-list) + (setq next-match (match-end 0))) + (setq code-list (nreverse code-list)) You can also use something like: (mapcar (lambda (s) (substring s 0 2)) (split-string status "\0")) to compute the value of ‘code-list’. Might be quicker, too. -- Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) (pcase (context query) (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA --------------------------------------- 6CE4 6703 2224 4C80 7502