I was trying to use GitHub CLI (gh)and its --jq flag (hence gojq) to simplify the command calls a bit, i.e. to do away with the need to piping gh output to jq. However, I ran into error parsing regexp: invalid named capture sometimes. For example, the following works with piping to jq:
This is not supported, because gojq is written in Go, and regular expression engine is RE2, which does not support lookbehind and lookahead. See WhyRE2, and its Syntax.
Hello,
I was trying to use GitHub CLI (
gh
)and its--jq
flag (hencegojq
) to simplify the command calls a bit, i.e. to do away with the need to pipinggh
output tojq
. However, I ran intoerror parsing regexp: invalid named capture
sometimes. For example, the following works with piping tojq
:but failed with
--jq
flag:and likewise when piping to the
gojq
:Tested with gojq v0.12.11, v0.12.13, and latest commit 2cc65b621eba3357cad1b2d6d93f53ede6c13e27 dated 2024-03-30 (post v0.12.14).
Many thanks!
Anthony