binary:matches/3 fails in R14A

Bartosz Kołodziej bartosz.kolodziej@REDACTED
Wed Aug 25 18:31:55 CEST 2010


binary:split/3 fails when option "global" is set and input is an empty
binary.

1> binary:split(<<>>,<<"a">>,[global]) gives:
** exception error: bad argument
     in function  binary:split/3

The problem lays in binary:matches/3 function:

2> binary:matches(<<>>,<<"a">>,[global]).
** exception error: bad argument
     in function  binary:matches/3
        called as binary:matches(<<>>,<<"a">>,[global])

Without "global" option it works just fine.


More information about the erlang-bugs mailing list