split - splitting at \x00

michael <>
Wed Jan 20 12:44:27 CET 2010


Hi,

if I want to split two string at ascii 0 ( <<"one",0:8, "two", 0:8>> ) then 
this worked:

regexp:split(Str, "\x00")
it gives : {ok, ["one","two",[]]}

But I cannot get it to work with the new re module. It seems to insert \x00 
between all the letters, it gives:
["o","n","e",[0],"t","w","o",[0],[]]

am I overlooking something?

 Michael




More information about the erlang-questions mailing list