Menu

Problem with Regex Implementation

2007-06-07
2012-11-13
  • Nobody/Anonymous

    It would seem that the regular expression library that N++ uses is broken or simply improperly implemented. I was attemping to find the regex "<\?[^=](.*?)\?>" and it would appear that N++ is matching the question marks literally.

     
    • pshute

      pshute - 2007-06-07

      According to http://notepad-plus.sourceforge.net/uk/regExpList.php \? should match a question mark.  As far as I can see, even just ? matches a question mark, i.e. it appears to have no special meaning.  Normally it means match 0 or 1 times, I think, but not here.  So perhaps you're right, it is poorly implemented (wait till you try to work with newlines).  But many regex implementations are quirky - you just have to know their idiosyncrasies.

       
      • Nobody/Anonymous

        That's entirely disappointing :/ Does N++ use it's own in-house library?

         
        • pshute

          pshute - 2007-06-13

          It uses the Scintilla regex implementation, so it seems like we have no control over it.  I've wondered whether it would be possible to write yet another find/replace plugin that uses its own regex implementation.

           
    • Nobody/Anonymous

      +1
      "That's entirely disappointing"

       
MongoDB Logo MongoDB