i'm developing a plugin for notepad++ that needs to manipulate(search and substitute) some selected text with regexs and i want to know if I can make use of some library already available in the Notepad++ environment or if i need to download and link to my plugin some external library .
I think that since Notepad++ allows regex in the search and replace pane, I should be able to use the same engine in the plugin I'm developing .
Can you please post an example ?
Although I have never directly used it, you should be able to use the regex library already built into N++ by enabling the regex flag when searching. See this scintilla documentation for info about the regex flag. Someone may be able to help you out better if you use this option.
Alternatively, you can use another library by either statically or dynamically linking it in. For my DoxyIt plugin I used T-Rex which is a very small regex parser that does everything I need. You can also use something like PCRE (which I believe is what N++ uses internally), or any other numerous options.
Hope this helps.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.