Replacing bidirectional unicode strings/regexps

E

Ernst Elzas

Hello,

I've tried to write a "sed s/original/replacement/g " -like script, but
for dealing with situations where both original and replacement contain
a mixture of left to right and right to left text (for now, English and
Hebrew) Both the texts can span multiple lines, and the replacement has
to be in files of a specific type (html) in all subdirectories. I'll
probably need to create the script (or at least the text to be replaced
and it's replacement) in some editor, since commandlines don't seem to
like bidirectional texts that much. I figured this would be easy, but
have not managed to get something working, nor have I found examples to
use. I did find some Python scripts doing related things, but they went
wrong as soon as I tried to adapt them to bidirectional text, the Perl
sed-like script also looked promising, but I did not manage to get that
working either in this situation. Please note that I had no prior
experience with the use of either language, and might easily have
overlooked the simple solution.

Thanks for your help,

Ernst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top