Page 1 of 1
Find and replace hex code
Posted: Tue May 20, 2003 11:33 am
by atglma
I am having difficulty with the find & replace function.
I want to replace hex 0C with hex 20 (SI with space) and although I can use the find function to find 0C (with the hex radio set) this does not work in the find and replace function. It just has no visible effect. I've also tried setting the text radio button and using \x0C but has the same result (or lack thereof).
Any suggestions gratefully recieved
Posted: Tue May 20, 2003 12:09 pm
by helios
Please see the example below, and check the conditions for "Text" and "Regular Expression", in the Replace dialog box.
\xdd --- Substitute the character with hex code dd (must be 2 hex digits, excluding 00).
Stephen MacDonald
Helios Software Solutions
http://www.textpad.com
Posted: Tue May 20, 2003 1:29 pm
by atglma
I'm trying -
Find what: \x0C
replace with: \x20
Text: set
Hex: unset
Match case: unset
regular expression: set
and ...
Find what: \x0C
replace with: \x20
Text: set
Hex: unset
Match case: set
regular expression: set
and ...
Find what: 0C
replace with: \x20
Text: unset
Hex: set
and ...
Find what: 0C
replace with: 20
Text: unset
Hex: set
All of the above with active document selected and single file opened in binary.
Cheers
Posted: Tue May 20, 2003 2:24 pm
by MudGuard
All of the above with active document selected and single file opened in binary.
Binary? The Hex View?
In Textpad, Hex View is just a view but not a Hex edit....
Posted: Thu Jul 31, 2003 5:09 am
by talleyrand
helios wrote:\xdd --- Substitute the character with hex code dd (must be 2 hex digits, excluding 00).
Sorry to lazarus this thread but is there any reason for this restriction? I received an aweful file from a legacy system today that I wanted to strip the non-printing characters from. I fired up my trusty Textpad (4.7.0) and I was able to strip out the \f no problem but when I went to yank out the NULLs I thought I was going insane. I could highlight the 00 and hit F5 but it'd never find anything, even the instance it was sitting on. Manually typing the 00 as Hex wasn't working. At least now I know I'm not going insane because Find can't locate \x00 but is there any reason for this limitation?