arkouda icon indicating copy to clipboard operation
arkouda copied to clipboard

Investigate `peel(regex=True)` with single character strings and `pattern` matching empty string

Open stress-tess opened this issue 2 years ago • 0 comments

Right now this is being caught on the client side and results in a ValueError, but with the safeguarding removed something like the below will result in the server hanging.

ak.array(["t"]).peel('', regex=True)

I believe this edge case is being mishandled on our end since the chapel code for peel only used Regex.matches which handles this case

use Regex;

writeln(compile('').matches('t'));
$ chpl PlayingAround.chpl -o playing
j$ ./playing
((matched = true, byteOffset = 0, numBytes = 0),) ((matched = true, byteOffset = 1, numBytes = 0),)

stress-tess avatar Aug 15 '22 17:08 stress-tess