(bind-func regex_split
(lambda (regex sym)
(let ((a:i8* (salloc 2048))
(b:i8* (salloc 2048)))
(sprintf a "")
(sprintf b "")
(rsplit regex (cstring sym) a b)
(append (list (if (> (strlen a) 0)
(Symbol a) (Symbol sym)))
(if (> (strlen b) 0)
(regex_split regex (Symbol b))
null)))))