hi. i'm not a regex expert. but, i think in the above, the second [ should not be considered a character class bracket, but rather just a character. cheers.
❯ echo foo | sd '\[\[[^[]*\]\[[^]]*\]\]' x
error: invalid regex regex parse error:
\[\[[^[]*\]\[[^]]*\]\]
^^
error: unclosed character class
❯ echo foo | sd '\[\[[^\[]*\]\[[^]]*\]\]' x
foo
hi. i'm not a regex expert. but, i think in the above, the second
[
should not be considered a character class bracket, but rather just a character. cheers.