Community
    • Login

    Replace a specific word to reinsert the word one character before

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 213 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Josef MörtlJ
      Josef Mörtl
      last edited by

      Hallo there,

      can anybody please help me to solve this problem. It`s not for commercial use but only for my privat hobby.

      I am working on a list of bavarian monuments. I transferred the list from PDF files to
      Notepad ++. Afterwards I want to import the list into an Excel worksheet.

      Unfortunately, the formatting was not transferred perfect, so that now the word “nachqualifiziert” stands in some lines alone, but it should be at the end of the line before.

      Is it possible to search the whole text for “nachqualifiziert” where it is alone in a line
      and then replace it in such a way, that it is set back by one character -
      like when you press the backspace button so it is than at the end of the line before

      D-1-7133-0198 Spätmittelalterliche und frühneuzeitliche Befunde. nachqualifiziert
      D-1-7133-0199 Mittelalterliche und frühneuzeitliche Befunde.nachchqualifiziert
      D-1-7133-0200 Frühneuzeitliche Befunde . nachqualifiziert
      D-1-7133-0202 Frühneuzeitliche Befunde . nachqualifiziert
      D-1-7133-0211 Mittelalterliche und frühneuzeitliche Befunde.
      nachqualifiziert
      D-1-7133-0220 Mittelalterliche und frühneuzeitliche Befunde.
      nachqualifiziert
      D-1-7133-0221 Siedlung der römischen Kaiserzeit. nachqualifiziert
      D-1-7133-0307 Siedlung der Frühlatenezeit.
      nachqualifiziertNotepad ++ Forum Replace.jpg

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Josef Mörtl
        last edited by

        @Josef-Mörtl said in [Replace a specific word to reinsert the

        Maybe search for \R(nachqualifiziert)$ and replace with ${1} using Regular expression search mode.

        Josef MörtlJ 1 Reply Last reply Reply Quote 2
        • guy038G
          guy038
          last edited by guy038

          Hello, @josef-mörtl, @alan-kilborn and All,

          An other solution could be :

          • SEARCH (?-i)\R(?=nachqualifiziert), as long as the word nachqualifiziert begins the next line

          or

          • SEARCH (?-i)\R(?=nachqualifiziert$), if the word nachqualifiziert must begin and end the next line

          • REPLACE Leave EMPTY

          • Tick the Wrap around option

          • Select the Regular expression search mode

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 1
          • Josef MörtlJ
            Josef Mörtl @Alan Kilborn
            last edited by

            Hey guys … sooo fast … you guys are fantastic … both solutions worked perfectly … thousand thanks from bavaria

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors