(************************************************************ split_by_colon.ml Created : Thu Jun 12 11:17:01 2003 Last modified: Thu Jun 12 11:19:21 2003 Compile: ocamlc str.cma split_by_colon.ml -o split_by_colon # FTP Directory: sources/ocaml # ************************************************************) let data = "tak:aki:mamewo" let regexp = Str.regexp ":" let _ = List.iter print_endline (Str.split regexp data)