so, I have files with text formatted like this:
untranslatedString : "translated string",
and I need to replace characters in "translated string" part with their Cyrillic representation. I use something like this:
paste <(sed 's/\([^:]\+:\)\([^:]\+\)/\1/' resources.js) <(sed 's/[^:]\+:\([^:]\+\)/\1/;y/abc/абц/' resources.js)
(abc/абц/ part is actually longer and includes all characters, this is for illustrative purposes).
problem arises in lines like this one:
abcTestString : "abc {ccb} bbc",
everything between {} should be left in it's original state, ie. character shouldn't be replaced. result should be:
abcTestString : "aбц {ccb} ббц",
and not
abcTestString : "aбц {ццб} ббц",
Also, there can be multiple {} parts per line.
How can I do that?