NppToolBucket icon indicating copy to clipboard operation
NppToolBucket copied to clipboard

Feature Request: escape regular expression

Open ghost opened this issue 8 years ago • 1 comments

A common workflow for me is:

  1. highlight a complex line of code from the current document
  2. open up multiline search and replace, prepopulated with line from step 1
  3. change Search Mode to regular expression
  4. manually add backslashes before any ., \, ?, *, +, {, (, [, ], ), } etc characters
  5. customize regular expression

I would like to eliminate step 4. Would it be possible to add a quick way to escape a regular expression into the tool?

ghost avatar Aug 07 '17 15:08 ghost

Hmm, interesting idea. I've seen regular expressions that are designed to escape regular expressions so I'm sure it's possible, but I think it can be rather error prone. Given my lack of time to contribute to this project I'm not sure I'll be able to add it, but I'm happy to accept a pull request.

phdesign avatar Aug 08 '17 11:08 phdesign