From 4155c99a12e439d5724a194dfadca0fa91671b31 Mon Sep 17 00:00:00 2001 From: n4zukker Date: Wed, 2 Apr 2025 21:45:23 -0400 Subject: [PATCH] Typo in cats example The quotation mark and closing parenthesis were swapped. Before: ``` $ echo "Hello kitty" | yq eval 'test("(?i)cats)"' Error: bad expression - probably missing close bracket on TEST ``` After: ``` $ echo "Hello kitty" | yq eval 'test("(?i)cats")' false ``` --- pkg/yqlib/doc/operators/headers/string-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/yqlib/doc/operators/headers/string-operators.md b/pkg/yqlib/doc/operators/headers/string-operators.md index b426b977..a7aa02fb 100644 --- a/pkg/yqlib/doc/operators/headers/string-operators.md +++ b/pkg/yqlib/doc/operators/headers/string-operators.md @@ -3,7 +3,7 @@ ## RegEx This uses Golang's native regex functions under the hood - See their [docs](https://github.com/google/re2/wiki/Syntax) for the supported syntax. -Case insensitive tip: prefix the regex with `(?i)` - e.g. `test("(?i)cats)"`. +Case insensitive tip: prefix the regex with `(?i)` - e.g. `test("(?i)cats")`. ### match(regEx) This operator returns the substring match details of the given regEx.