RosettaCodeData/Task/Tokenize-a-string-with-escaping/OCaml/tokenize-a-string-with-escaping-2.ml

3 lines
160 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let res = split_with_escaping ~esc:'^' ~sep:'|' "one^|uno||three^^^^|four^^^|^cuatro|";;
val res : string list = ["one|uno"; ""; "three^^"; "four^|cuatro"; ""]