Reputation: 563
I've just started to get to grips with regex in notepad++ and I've tasked myself with formatting a chunk of JSON data into something human readable, as well as something that can be read into an algorithm a colleague of mine wrote. I've found a few regex expressions that do this perfectly, but in order to get to my desired result, I have to do it in four separate Find/Replace steps. Is there some sort of way I can create one single find/replace expression that handles all of the above tasks for me?
Currently I have Notepad++ doing the following:
I know that's convoluted, but fortunately it does the job. Is there any way of consolidating all that into a single command, or does that all have to be done step by step?
Thanks guys :)
Upvotes: 0
Views: 720
Reputation: 1374
Notepad ++ allows you to consolidate individual search and replaces as a macro which you can also save.
As for the first to replacements you could use the following expression: (?:"|,)
Upvotes: 1