Multiple word search and replace in notepad++

Try a regular expression replace of (good)|(great)|(fine) with (?1bad)(?2worse)(?3not). The search looks for either of three alternatives separated by the |. Each alternative has ist own capture brackets. The replace uses the conditional form ?Ntrue-expression:false-expression where N is decimal digit, the clause checks whether capture expression N matches. Tested in Notepad++ 6.3 Update: You can … Read more

Is is possible to export functions from a C# DLL like in VS C++?

Unmanaged Exports => https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports DLLExport => https://github.com/3F/DllExport How does it work? Create a new classlibrary or proceed with an existing one. Then add the UnmanagedExports Nuget package. This is pretty much all setup that is required. Now you can write any kind of static method, decorate it with [DllExport] and use it from native code. … Read more

How to use conditionals when replacing in Notepad++ via regex

The syntax in the conditional replacement is (?{GROUP_MATCHED?}REPLACEMENT_IF_YES:REPLACEMENT_IF_NO) The { and } are necessary to avoid ambiguity when you deal with groups higher than 9 and with named capture groups. Since Notepad++ uses Boost-Extended Format String Syntax, see this Boost documentation: The character ? begins a conditional expression, the general form is: ?Ntrue-expression:false-expression where N … Read more

Convert tabs to spaces in Notepad++

To convert existing tabs to spaces, press Edit->Blank Operations->TAB to Space. If in the future you want to enter spaces instead of tab when you press tab key: Go to Settings->Preferences…->Language (since version 7.1) or Settings->Preferences…->Tab Settings (previous versions) Check Replace by space (Optional) You can set the number of spaces to use in place … Read more

Removing duplicate rows in Notepad++

Notepad++ with the TextFX plugin can do this, provided you wanted to sort by line, and remove the duplicate lines at the same time. To install the TextFX in the latest release of Notepad++ you need to download it from here: https://sourceforge.net/projects/npp-plugins/files/TextFX The TextFX plugin used to be included in older versions of Notepad++, or … Read more