regexp-tree icon indicating copy to clipboard operation
regexp-tree copied to clipboard

[group-single-chars-to-char-class] corrupts regexp when using square bracket

Open Maxim-Mazurok opened this issue 1 year ago • 1 comments

Optimizes /(\]|a|[12])/ into /([12]a])/ which isn't correct

Maxim-Mazurok avatar Apr 16 '23 06:04 Maxim-Mazurok

Thanks, we might need to exclude the ] at all from this transform. Will appreciate a PR.

DmitrySoshnikov avatar Sep 06 '23 20:09 DmitrySoshnikov