V, 10 bytes
ò/ 0⏎b2dw0 Explanation
ò " run the following, until an error occurs / 0⏎ " | goto next zero with space in front (errors if none) b " | jump one word back (to the beginning of element to pop) 2 " | twice (element & zero itself) dw " | | delete word 0 " | goto beginning of line Equivalent in Vim, 16 bytes
qq/ 0⏎b2dw0@qq@q Explanation
Pretty much the same, except recording a macro q and recursively call it:
qq " record macro q / 0⏎b2dw0 " same as in V @q " recursively call q (aborts on error) q " quit recording @q " execute the macro q