Git Product home page Git Product logo

csharpregextools4npp's Introduction

CSharpRegexTools4Npp

Some tools to use C# Regex in Notepad++ (As Notepad++ Plugin)

Features

  • 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

Prerequistes

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

Installation

  • 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++)

Usage

To Launch the tools use one of these 3 methods :

  • Click on the toolbar button ToolbarIcon
  • Click on Menu "Plugins" -> "C# Regex Tools 4 Npp" -> "C# Regex Tools"
  • Press "Ctrl+Shift+H" on your keyboard

Show matches of the Regex

List-Matches-Preview

Use Regex snippets

Use-Regex-Snippets

Replace all occurences

Replace-all-

Replace with C# script

Replace-With-C#

Standards Regex operations from the toolbar

Toolbar-Actions

  1. Is Match ? : Show a "Yes" if at least one match is found in the text source. Show a "No" otherwise
  2. Matches : Fill the list of all found matches with Groups and Captures
  3. Select All Matches : Select all found matches in the current Notepad++ tab (Can be use for multi-edition)
  4. Extract All : Extract all matches results in a new Notepad++ tab
  5. Replace All : Replace all matches in the text source

Some others functionalities (options) preview

Replace-Elements

Replace-Elements

Text-sources

Credits

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 :

FatCow (Creative Commons 3.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.