Page 1 of 1

Need Better Search / Replace using Hex

Posted: Wed Oct 11, 2006 4:03 pm
by aflat362
I'm using the search / replace feature. I have the hex option selected and am searching for 0C which is a Form Feed Character.

I want to replace the hex 0C with Hex 0D 0A which is Carridge Return / Line Feed.

However, the replace functionality seems to be limited to only regular characters. I can't indicate a Hex value or even a regular expression.

I then thought, I could open the file as a binary file (hex view) and search and replace that way. However, TextPad seems to open files in Read Only mode when you view them in binary.

As far as I can tell there is no way at all to search for Hex 0C and replace with Hex 0D 0A.

Posted: Wed Oct 11, 2006 4:20 pm
by ben_josephs
Find what: \x0c
Replace with: \n

[X] Text
[X] Regular expression
and make sure the file is saved with DOS style line endings. Check with
View | Document Properties | Document | File type.

that worked

Posted: Wed Oct 11, 2006 4:29 pm
by aflat362
Thanks that worked.