Say I have
Bin = <<"10=123">>
This function
binary:split(Bin, <<"10=">>),
splits it into
[<<"10=">>, <<"123">>]
Instead I need it to match the last 3 numbers.
Even if its 345 or 777.
The one for sure thing is that it will always be 3 numbers.
So it would instead match the entire pattern
Im not too good with binaries but I believe I am looking for something like
binary:split(Bin, <<01,"10=", 3/binary>>),
I’m not 100% sure what you mean but if you only want to match the <<“123″>> part then you could simply do:
If you don’t want to match at all on the <<“10=”>> part just replace it above with “_:3/binary”.
If this is what you want then your original way would have worked just as good: