Menu

Regex help... bug?

CodeNexus
2007-01-19
2013-01-15
  • CodeNexus

    CodeNexus - 2007-01-19

    I would love to be able to type things like \n into the "find" part of find and replace and get expected results...

    find: \n
    replace: \n\n

    with the regex box ticked should allow me to change a single new line entity to two new lines.

     
    • AlphaLyrae

      AlphaLyrae - 2007-01-22

      Regex in notepad++ are not powerful. You can't use \n in find.
      But you can do this without regex :
      Select two lines, press ctrl H and you'll have two strange characters.
      Those squares are the carriage return and the line feed I think.
      Copy them and use it in the replace field too.
      And don't forget to uncheck regex.

       
    • AlphaLyrae

      AlphaLyrae - 2007-01-22

      Or use ctrl R, the replace tool of TextFX.
      ctrl enter to create new lines

       
  • Fixfoxy

    Fixfoxy - 2013-01-11

    Hi, regarding the Replace-Regex: i found that this crashes the n++ 6.2.3 entirely!

    1. paste some lines into n++
    2. CTRL-H: SearchMode:Regex FIND:^ REPLACE:' works
    3. CTRL-H: SearchMode:Regex FIND:$ REPLACE:', crashes n++

    can someone confirm this?

     
  • cchris

    cchris - 2013-01-15

    Chances are that 6.2.4 solves this - see the thread on regex empty matches.

    CChris

     
MongoDB Logo MongoDB