Need Better Search / Replace using Hex

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
aflat362
Posts: 2
Joined: Wed Oct 11, 2006 3:58 pm

Need Better Search / Replace using Hex

Post 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.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
aflat362
Posts: 2
Joined: Wed Oct 11, 2006 3:58 pm

that worked

Post by aflat362 »

Thanks that worked.
Post Reply