: split-csv ( String -- List )
    "\\s*,\\s*" regex.split drop
;

: split-sentences ( String -- List )
    "[.!?]+\\s*" regex.split drop
;

: test-split ( -- )
    "apple, banana,  cherry" split-csv
    list.length 3 test.assert-eq

    "Hello! How are you? I'm fine." split-sentences
    list.length 3 test.assert-eq
;
