regex replace in a plugin : whats library to use ?

2013-09-14
2013-09-16
  • Alessio Pollero

    Alessio Pollero - 2013-09-14

    Hi,
    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 ?

    Thanks.

     
  • dail8859

    dail8859 - 2013-09-16

    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.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks