Community
    • Login

    Notepad++ How to find and select all words between select words and copy the selected

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 898 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.
    • Kari LabermoK
      Kari Labermo
      last edited by

      I have a file with many lines like this of different text.

      #EXTINF:-1 group-title=“MOVIE:” tvg-name=“Abominable [Multi-Subs] [2019]” tvg-logo=“https://image.tmdb.org/t/p/w600_and_h900_bestv2/20djTLqppfBx5WYA67Y300S6aPD.jpg” group-title=“Movie: Cartoon Multi Subtitles”,Abominable [Multi-Subs] [2019]

      I would like to find group-title=“Movie: Cartoon Multi Subtitles”, the cut out the selected and the find group-title=“MOVIE:” in the begining of the line and replace it with the text that was select and cut out. If there is any that can help me with a macro for this

      I hope anyone understand of what i’m after
      :)

      Best regards
      kari

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        Hello, @kari-labermo,

        Not totally clear ! The best is to express, both, what you have AND what you expect to !

        So, do you expect :

        BEFORE :
        
        #EXTINF:-1 group-title="MOVIE:" tvg-name="Abominable [Multi-Subs] [2019]" tvg-logo="Address" group-title="Movie: Cartoon Multi Subtitles",Abominable [Multi-Subs] [2019]
        
        AFTER :
        
        #EXTINF:-1 group-title="MOVIE: Cartoon Multi Subtitles" tvg-name="Abominable [Multi-Subs] [2019]" tvg-logo="Address" group-title="Movie:",Abominable [Multi-Subs] [2019]
        

        OR this replacement :

        BEFORE :
        
        #EXTINF:-1 group-title="MOVIE:" tvg-name="Abominable [Multi-Subs] [2019]" tvg-logo="Address" group-title="Movie: Cartoon Multi Subtitles",Abominable [Multi-Subs] [2019]
        
        AFTER :
        
        #EXTINF:-1 group-title="MOVIE: Cartoon Multi Subtitles" tvg-name="Abominable [Multi-Subs] [2019]" tvg-logo="Address" ,Abominable [Multi-Subs] [2019]
        

        Note that I simply replaced the Internet link, of the tvg-logo attribute, by the name Address in order to get shorter lines !


        Remark : To easily insert raw text, look at this post

        Best regards,

        guy038

        1 Reply Last reply Reply Quote 3
        • Kari LabermoK
          Kari Labermo
          last edited by

          Hi guy038

          I’m after the second one: That is exatc what i’m after :)

          Best regards Kari

          1 Reply Last reply Reply Quote 0
          • guy038G
            guy038
            last edited by

            Hi, @kari-labermo and All,

            OK ! So, here is the road map :

            • Open the Replace dialog ( Ctrl + F )

            • SEARCH (?-is)(group-title="MOVIE:)"(\x20.+)group-title="Movie:(.+?")

            • REPLACE \1\3\2

            • Tick, preferably, the Wrap around option

            • Select the Regular expression search mode

            • Click once on the Replace All button or several times on the Replace button

            => Any range of text, after the string group-title="Movie:, with this exact case, till the next double quotes ", should be moved right after the string group-title="MOVIE:, with this exact case !

            Best regards,

            guy038

            1 Reply Last reply Reply Quote 3
            • Kari LabermoK
              Kari Labermo
              last edited by

              Hi guy038

              It worked like a dream

              Many thanks

              Kari Labermo

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