G'day kluther,
Rather than using all those substitutions, you can do a single transliteration. Here's a commandline example:
$ perl -Mstrict -Mwarnings -Mutf8 -e '
binmode STDOUT => ":utf8";
while (<>) {
s/@([^@]+)@/$_ = $1; y{abcABC}{абцАБЦ}; $_/eg;
print;
}
'
@abc@ abc @ABC@
абц abc АБЦ
cba @cba CBA@
cba цба ЦБА
-- Ken
In reply to Re: Find pieces of text in a file enclosed by `@` and replace the inside
by kcott
in thread Find pieces of text in a file enclosed by `@` and replace the inside
by kluther
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |