NotePad++: Replace all content after delimiter on each line


We have a configuration file for Skype, that on each line it describes the translation for each element of Skype.

The format on each line is as VARIABLE=VALUE.

We decided to remove all values automatically, to do that we used NotePad++.

Skype - Language File - Dialog

We pressed Ctrl+H to open up the Replace dialog. In the ‘Find what’ field we wrote =[^\n]*$ and in the ‘Replace with’ we wrote =. In the ‘Search Mode’ option we selected ‘Regular expression’.

The tool looked as follows:
Skype - Language File - Before

Hitting the ‘Replace All’ button, removed all values from each line as it can be viewed below:
Skype - Language File - After
=[^\n]*$ instructs NotePad++ to match everything including the = symbol until the end of the line. [^\n]* means to match everything except the new line character. $ matches the end of the line.

Leave a Reply