Menu

Newbie: Find & Replace issue

2009-08-10
2012-11-14
  • Jerry Pettit

    Jerry Pettit - 2009-08-10

    I am trying to convert a list of definitions from looking like this,

    Word1:  Definition1 blah blah blah
    Word2:  Definition 2 blah blah blah

    to a format like this,

    Q:  Word1
    A:  Definition 1

    Q: Word 2
    A:  Definition2

    Etc.

    I need it to be in this format to be able to import into a program I use called Supermemo.

    I just used Notepad++ for the first time and was able to get it looking fine in Notepad++, with all the carriage returns between each set of Q&As, but when I open the same file now in Windows Notepad--just checking prior to import--none of the carriage returns are there. 

    Why are the carriage returns (which I had inserted using Search\Replace and using "extended" and "\r") showing in NP++, but not in Windows NP?

    Thanks in advance.

     
    • Jerry Pettit

      Jerry Pettit - 2009-08-20

      Thanks for the help!

       
    • Jerry Pettit

      Jerry Pettit - 2009-08-14

      Wrong forum?

       
    • Glenn

      Glenn - 2009-08-14

      Not sure on this because I cannot find in the documentation what the different Extended options are, but maybe \r only replaces with a carriage return and does not insert the line feed, which windows needs both in most cases.  Try replacing the \r with a \r\n.  I am only guessing that the \n might be a line feed.

       
    • Glenn

      Glenn - 2009-08-14

      I just ran a test then opened the file in UltraEdit, which has a hex view (does NP++?), and I was right, the \r\n replaces with a carrige return and a line feed, which makes it show up correctly in Notepad and is the proper way for a text file to delimit a record.

       
    • cchris

      cchris - 2009-08-15

      NP++ doesn't have a native hex view, but there is a plugin called Hex Editor, available from the npp-plugins project Files page.

      CChris

       
      • Don HO

        Don HO - 2009-08-19

        > NP++ doesn't have a native hex view, but there is a plugin called Hex Editor,
        > available from the npp-plugins project Files page.

        Hex Editor plugin is extremely unstable.
        Use it at your own risk and peril.

        Don

         
MongoDB Logo MongoDB