Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    begining and end of line

    Help wanted · · · – – – · · ·
    2
    3
    874
    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.
    • Pouemes44
      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 Sumner 1 Reply Last reply Reply Quote 0
      • Scott Sumner
        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
        • Pouemes44
          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
          Copyright © 2014 NodeBB Forums | Contributors