Notepad++ How to find and select all words between select words and copy the selected
-
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 -
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-logoattribute, by the nameAddressin order to get shorter lines !
Remark : To easily insert raw text, look at this post
Best regards,
guy038
-
Hi guy038
I’m after the second one: That is exatc what i’m after :)
Best regards Kari
-
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 aroundoption -
Select the
Regular expressionsearch mode -
Click once on the
Replace Allbutton or several times on theReplacebutton
=> 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 stringgroup-title="MOVIE:, with this exact case !Best regards,
guy038
-
-
Hi guy038
It worked like a dream
Many thanks
Kari Labermo