Open DMaxter opened 3 months ago
Hey, yep that's a bug. You can turn off string-interpolation using that flag though, you just need to set it to false:
yq --string-interpolation=f '.[] | select(.name | test("d\(ef\)"))' examples/data1.yaml
That said, I'll fix the bug so when a unclosed interpolation is detected, it will skip interpolation (and log a warning) instead of aborting.
Is there any usecase where we want string interpolation inside regex matches? I mean, we can always do test("something " + .property + " another something")
, right?
Fixed in 4.44.3
Seems to be working on my end. Thank you
Describe the bug When handling regex matching with
yq
, if we want to match against a parentheses, it is not possible. We always get this error about unclosed interpolation stringVersion of yq: >= 4.43.1 Operating system: Linux Installed via: binary release
Input Yaml data.yml:
Command The command you ran:
Actual behavior
Expected behavior
Additional context I think the string interpolation feature is not working well, regex matching is greatly affected here