I have been looking into this library to allow regexp to match arbitrary byte sequences in a pattern. It seems that while it works fine for truly arbitrary bytes, utf8 bytes, or more precisely Go string literals with unicode characters in them, do not seem to get matched. While this library is not meant to use unicode semantics, e.g. I believe .
matches a single byte, not a single rune, I would expect utf8 bytes themselves to still be matchable.
I have created a test case comparing binaryregexp and re2 with latin1 for the same expression/input using utf8 strings here
--- FAIL: TestUnicode (0.00s)
--- FAIL: TestUnicode/ハロー/ハローワールド (0.00s)
--- PASS: TestUnicode/ハロー/ハローワールド/re2 (0.00s)
--- FAIL: TestUnicode/ハロー/ハローワールド/binaryregexp (0.00s)
--- PASS: TestUnicode/ハロー/グッバイワールド (0.00s)
--- PASS: TestUnicode/ハロー/グッバイワールド/re2 (0.00s)
--- PASS: TestUnicode/ハロー/グッバイワールド/binaryregexp (0.00s)
FAIL