Some tools to use C# Regex in Notepad++ (As Notepad++ Plugin)
- Syntax Highlight of the C# Regex
- List all matches (With groups and captures)
- Select All matches
- Replace All matches (with replace syntax or C#)
- Extract All matches in a new Notepad++ tab
- Work on current Notepad++ tab text, on current selection or in a directory
- Named groups, lookbehind, lookforward and all features of C# Regex
- Keep an history of typed regex
- Save/Reload Regex
Need a Notepad++ x86 or x64 installed on the machine and the right to write in the plugin directory. (At least version 7.6.3, older versions can work but need modification of the file NppPlugin.DllExport.targets see Notepad++ plugins new directories structures)
Need .Net Framework 4.7 or greater
- Download the last release zip
- Uncompress it in the "%PROGRAMFILES%\Notepad++\plugins" directory
Or
- Clone this repo
- Give write access to "%PROGRAMFILES%\Notepad++\plugins" directory
- Launch CSharpRegexTools4Npp.sln in Visual Studio
- Select the target platform x86 or x64 depending on your version of Notepad++
- Compile and launch (F5) (It will copy the plugin in the right place and launch Notepad++)
To Launch the tools use one of these 3 methods :
- Click on the toolbar button
- Click on Menu "Plugins" -> "C# Regex Tools 4 Npp" -> "C# Regex Tools"
- Press "Ctrl+Shift+H" on your keyboard
- Is Match ? : Show a "Yes" if at least one match is found in the text source. Show a "No" otherwise
- Matches : Fill the list of all found matches with Groups and Captures
- Select All Matches : Select all found matches in the current Notepad++ tab (Can be use for multi-edition)
- Extract All : Extract all matches results in a new Notepad++ tab
- Replace All : Replace all matches in the text source
Based on : NotepadPlusPlusPluginPack (Apache-2.0 license) Merged manually with a part of the version used in CS-Script.Npp (under MIT license) for better x64 support and remodified for the way I use it.
use :
AvalonEdit For Regex edition and syntax Highlighting (MIT license)
CS-Script For C# Match replace (MIT license)
Newtonsoft.Json (MIT license)
Ookii.Dialogs (For Open and Save dialogs specific license)
PropertyChanged.Fody (MIT license)
Costura.fody Merge all in one DLL, without it it doesn't work (MIT license)
And for icons :