I am using this to split strings:
let split = Str.split (Str.regexp_string \" \") in let tokens = split instr in ....
But the problem
Using Jane Street's Core library, you can do:
let python_split x = String.split_on_chars ~on:[ ' ' ; '\t' ; '\n' ; '\r' ] x |> List.filter ~f:(fun x -> x <> "") ;;