Replies: 1 comment
-
i made few test: yq '.. | select(type == "!!str" and test("\(\([^\\)]+)) |= sub("(?:\(\()([^\\)]+)(?:\)\))" ; "ff${1}ff" | upcase)' and in output i have : aaa FFxyzFF bbb FFabcFF abc so upcase affect all but the ${1} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i want to catch all text in double () and replace it with a text built with capture"
for exemple
aaa ((xyz)) bbb ((abc)) abc
yq 'sub("(?:\(\()([^\\)]+)(?:\)\))" ; "${1}" | upcase)'
i expect output to be:
aaa XYZ bbb ABC abc
but no .... it seem that nothing but string concat work as right arg of sub()
Beta Was this translation helpful? Give feedback.
All reactions