Menu

Regular expression

2008-07-30
2012-11-13
  • Nobody/Anonymous

    Why N++ use such strange RExpr?
    Why not use any standards RExpr?

    and current used RExpr has a bug:

    in text: one one two two
    search: one .* two

    it select all string ("one one two two") while must select only by the first "two" ("one one two")

    Control + R also searched "one * two" differently: it find only ("one two"). this has two errors: 1. Go throw first "one" 2. find one symbol " " while search string contain two

     
    • cchris

      cchris - 2009-07-07

      See IdeaTorrent on this. Switching to PCRE is possible and planned, but this is not exactly trivial, and there is no release date for this feature.

      CChris

       
    • Nobody/Anonymous

      o sorry
      2. is my mistake :)

       
      • Nobody/Anonymous

        no
        2. is also a bug ctrl+R

         
        • bushost_teamleader

          Ctrl+R is not working on my computer (Windows 7 pre-release). Please e-mail me at owner@nccomputing.ca on how to resolve this problem. Version 5.3.1 works for Ctrl+R but 5.4.4 does not bring anything up when you click Ctrl-R

           
    • Sune Marcher

      Sune Marcher - 2008-07-30

      Notepad++ uses scintilla's RegExp engine, which is limited compared to, say, PRRE. I guess this makes sense since you get that "for free" when you're already using the scintilla edit control, but considering how many people have asked questions wrt. the limited power, perhaps it'd be better to use PCRE by default?

      It's my understanding that "one .* two" should indeed match the full "one one two two", using greedy capture - if you want only the "one one two" part to be matched, you should do a non-greedy capture.

       
    • Nobody/Anonymous

      There's is a way to change the regular expression's engine inside notepad++