Find and Replace

Selecting Find from the Edit menu will bring up the Find Dialog.

Figure 3. GHex Find Dialog

It allows you to search the file for a string that you can enter in either hex or ascii. To find an ASCII string, simply enter it into the entry widget and click on the Find Next or Find Previous button. You can choose in which form (either hex or ASCII) you wish to enter the search string with the two radio buttons below the entry widget.

Replacing data is much alike, except that you have to enter both a string to be found and a string that will replace the found value. Selecting Replace from the Edit menu brings up the Find/Replace Dialog.

Figure 4. GHex Find/Replace Dialog

The Find Next button will search for the next occurence of the string from the first entry widget, the Replace button will replace the data if the cursor is on the beginning of a string that equals to the searched-for one and then search for the next occurence, if the cursor is not positioned on the beginning of the searched-for string, it will try to find the next occurence of it, but will not replace that one. Finally, the Replace All button will replace all occurences of the searched-for string from the current cursor position to the end of the file.