Community
    • Login

    begining and end of line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.1k 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.
    • Pouemes44P
      Pouemes44
      last edited by

      Hello
      i have some lines in different text files which begin by Langue:

      by ewample in a file
      Langue: something

      in an other

      Langue: other words

      so in each text file i g
      i would find all the end of lines which begin by Langue:… and copy under a second line

      to get as result

      Langue: something
      Titre:

      or
      Langue: other words
      Titre:

      How to copy a text after a line which begin by a selected word?

      thanks

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Pouemes44
        last edited by

        @Pouemes44

        Regular expressions (read about them) can do it:

        Find what zone: (?-s)^word1.*\R
        Replace with zone: $0word2\r\n
        Match case checkbox: your choice if you need it ticked or not
        Search mode: Regular expression

        1 Reply Last reply Reply Quote 0
        • Pouemes44P
          Pouemes44
          last edited by

          @Scott-Sumner said:

          Find what zone: (?-s)^word1.*\R
          Replace with zone: $0word2\r\n
          Match case checkbox: your choice if you need it ticked or not
          Search mode: Regular expression

          thanks scott works perfectly

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