• Login
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.
  • P
    Pouemes44
    last edited by Jan 25, 2018, 4:10 PM

    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

    S 1 Reply Last reply Jan 25, 2018, 4:25 PM Reply Quote 0
    • S
      Scott Sumner @Pouemes44
      last edited by Jan 25, 2018, 4:25 PM

      @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
      • P
        Pouemes44
        last edited by Jan 25, 2018, 5:18 PM

        @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
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors