split not splitting at pipe symbol

Dirk Scharff dirk.scharff@REDACTED
Sat Jan 8 15:32:36 CET 2011


Hi all!

I'm experiencing a problem with re:split/2 which doesn't seem to be able to split at a pipe symbol "|". Is there a reason for this or is this a bug?

Reproduce as follows:
1> re:split("123|456","|").
[<<"1">>,<<"2">>,<<"3">>,<<"|">>,<<"4">>,<<"5">>,<<"6">>,
 <<>>]
2> re:split("123|456",[124]).  
[<<"1">>,<<"2">>,<<"3">>,<<"|">>,<<"4">>,<<"5">>,<<"6">>,
 <<>>]
3> regexp:split("123|456","|").
{ok,["123","456"]}

Regards,
Dirk.


More information about the erlang-questions mailing list