Search code examples
notepad++

Notepad++ Advanced search


I have a text file which has 8160651 lines approx. In that text file there are approx 20000 lines of following format:

StartChar: uniFED3_afii5_uniFEA8_afii57455_uniFEEE_afii57458_afii57425_afii57454_afii57415
Encoding: 92628 -1 27691
Width: 3285
GlyphClass: 2
Flags: W
TtInstrs:
..
..
..

StartChar: uniUNIO_aEIGH_uniFEA8_afii57455_uniFEEE_afii57458_afii57425_afii57454_afii57415
Encoding: 967828 -1 27691
Width: 328
GlyphClass: 3
...and so on...

StartChar is common in all the lines.

I want to replace all the occurrences of StartChar as follows:

StartChar: uniFED3_afii57454_uniFEA8_af_ to StartChar: word00001
StartChar: uni06F2_afii57454_uniF345_affi5746 to StartChar: word00002
... and so on.

Replacement names (StartChar: word00001, StartChar: word00002...etc are saved in another text file).

It will take more than a year if I do it manually.


Solution

  • This is not something Notepad++ can do, or if it can then it's seriously advanced.

    Personally I'd prefer writing a small PHP script to parse the files for me and run it through the command line - you can use your language of choice, but a small one-time program will be a hell of a lot more efficient than anything NP++ can do, and easier to do!