You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to strip away some text from part of a text. Trying to use something like sub("!.*"; "") doesn't work, as it is giving me a Segmentation fault when text is too long. So I tried to go this route:
$ jq '.msg | .[0:index("!")]'
which works fine with input like: {"msg": "hello world!"}
but fails when text contains wide characters: {"msg": "здравствуй мир!"}