Okay, so Im trying to replace a line like this
00010 (0x000A)
with something like:
0010 (0x000A)
Basically just removing the first 0 from a string of 5 numbers. The file is about 134k lines. So I just want to remove the first 0 from a line of 5 numbers in length, to make the final string 4 numbers.
I’ve been reading on the find function in Notepad++ using regular expressions, but for the life of me, I really cannot wrap my head around how it functions. Very confusing stuff.
So an answer would be great—an answer with some explanation would be fantastic!
I don’t have Notepad++ on this machine so can’t test right now, but this regex should work.
Find:
^[0-9]([0-9]{4})$Replace:
\1Breaking that down, it matches the start of the string, followed by a character in the range 0-9, followed by four more of those characters, capturing them, then the end of the string, and replaces it with the first capture group.