Is there any way to use regex replace function in the Hex Editor?
The Hex Editor plugin is awesome but it lacks something very useful: Regular Expressions in searching or replacing. Is there any alternative hex editor plugin that has it or maybe a plugin for that plugin that adds regex in?
Thanks in advance!
I’d hazard to guess that if you are doing much “hex editing”, then you are going about things the “wrong way”. At least, in the year 2022… And yes, this reply isn’t answering your question, it is to get you thinking about what you are doing and why you are doing it…
However, there is a small chance that you have a good reason for your desire, in which case the answer is, no, not really.
@Alan-Kilborn I do have a good reason, I’m just downloading Zombie Escape maps and playing them alone in singleplayer with NPCs but editing the .bsp files to turn all the timers to 1 second only. I miraculously figured out the exact pattern to do it (i run two regex replacements, one where it finds double digits and makes them 01, the other finds 1 digit and makes them all 1) and it works, but I use a separate hex editor and the only hex editor out there that supports regex called 010 Editor, and since I love Notepad++ and use it a lot with regex stuff, I also figured it’d be much more comfo to use all that in one software than download seperate stuff for separate things (the fact that NPP has macros and 010 Editor doesn’t). Hope it’s understandable.
Edit: Obviously desconstructing each map file with Hammer Editor and finding those timers is bigger work than just finding textual patterns in it and change it all with two clicks lol, especially when I’m not changing anything graphical, literally just certain numbers of certain timers in certain functions.
I suppose your goal, purely for hacking purposes, is a reasonable one. :-)
I’m still a bit light on knowledge on exactly what you have, but can’t you just use Notepad++'s normal Replace operation for it (forgetting hex editing)?
It might require opening your file in “ANSI” encoding mode…