79792520

Date: 2025-10-16 19:51:23
Score: 1.5
Natty:
Report link

Oniguruma in jq supports Perl's \Q/\E 👀

https://github.com/kkos/oniguruma/blob/f95747b462de672b6f8dbdeb478245ddf061ca53/doc/SYNTAX.md#0-onig_syn_op2_esc_capital_q_quote-enable-qe

$ jq -n '"foo $ bar" as $var | "hello foo $ bar baz" | sub("\\Q\($var)\\E"; "new string")'
"hello new string baz"
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
Posted by: tianon