Replacing nulls
Posted: Thu Jul 05, 2012 11:34 pm
I need to replace a string several thousand times in index files for a set of many thousands of PDF files. Unfortunately the word "chronicle" was misspelled as "chronicale". The files are renamed, now need to fix the indexes.
The characters are separated by NULL, \x00.
n\x00i\x00c\x00a\x00l\x00e
I've been able to find the string OK, in various forms, including, e.g.,
n\(\x00\)i\(\x00\)c\(\x00\)a\(\x00\)l\(\x00\)e
or another where every character was tagged.
The "a\x00" pair needs to be removed.
I've tried a replacement string like;
n\(\1\)i\2c\3l\4e
but in every case the only character that goes into the replacement is the "n".
Any ideas or tips would be most welcome.
Thanks.
The characters are separated by NULL, \x00.
n\x00i\x00c\x00a\x00l\x00e
I've been able to find the string OK, in various forms, including, e.g.,
n\(\x00\)i\(\x00\)c\(\x00\)a\(\x00\)l\(\x00\)e
or another where every character was tagged.
The "a\x00" pair needs to be removed.
I've tried a replacement string like;
n\(\1\)i\2c\3l\4e
but in every case the only character that goes into the replacement is the "n".
Any ideas or tips would be most welcome.
Thanks.