S2-S4: tighten lexer condition, fix doc header, add Unicode example

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/ec06083e-e20a-45d2-bf7e-4e1fa7be1073

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-06 08:45:00 +00:00
committed by GitHub
co-authored by mikefarah
parent 1afa3c73dc
commit adb150d1fb
3 changed files with 24 additions and 3 deletions
@@ -1,4 +1,4 @@
# Slice/Splice Array or String
# Slice Array or String
The slice operator works on both arrays and strings. Like the `jq` equivalent, `.[10:15]` will return a subarray (or substring) of length 5, starting from index 10 inclusive, up to index 15 exclusive. Negative numbers count backwards from the end of the array or string.