<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Copying contents between a specific string and a character]]></title><description><![CDATA[<p dir="auto">Hi All!<br />
I’d like to request a bit of help with the following.<br />
I have a text-file (converted from an e-book) with a structure like this:</p>
<hr />
<p dir="auto">9/Maywood</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
1983 - Het beste van Maywood<br />
1987 - Beside You<br />
1990 - Achter De Horizon<br />
1991 - 6 Of The Thirties</p>
<p dir="auto">10/Talking Heads</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
Fear of Music (1979)<br />
Remain in Light (1980)</p>
<p dir="auto">11/Sly and the Family Stone</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
1968: Life<br />
1969: Stand!<br />
1971: There’s a Riot Goin’ On</p>
<p dir="auto">12/Delaney &amp; Bonnie</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
To Bonnie from Delaney - Atco, 1970<br />
Motel Shot - Atco, 1971<br />
Country Life - Atco, 1972<br />
D&amp;B Together - Columbia, 1972</p>
<p dir="auto">13/Mother’s Finest</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
Iron Age (1981), Atlantic</p>
<p dir="auto">14/INXS</p>
<p dir="auto">Description of the band, stories and anecdotes about them, etc.</p>
<p dir="auto">Albums:<br />
Shabooh Shoobah (1982)<br />
The Swing (1984)<br />
Listen Like Thieves (1985)</p>
<p dir="auto">and so on…containing approx. 800 bands.</p>
<hr />
<p dir="auto">I need a file containing only the albums ("Albums:’ line included) uninterruptedly in the following format:</p>
<p dir="auto">Albums:<br />
1983 - Het beste van Maywood<br />
1987 - Beside You<br />
1990 - Achter De Horizon<br />
1991 - 6 Of The Thirties<br />
Albums:<br />
Fear of Music (1979)<br />
Remain in Light (1980)<br />
Albums:<br />
1968: Life<br />
1969: Stand!<br />
1971: There’s a Riot Goin’ On<br />
Albums:<br />
To Bonnie from Delaney - Atco, 1970<br />
Motel Shot - Atco, 1971<br />
Country Life - Atco, 1972<br />
D&amp;B Together - Columbia, 1972<br />
Albums:<br />
Iron Age (1981), Atlantic<br />
Albums:<br />
Shabooh Shoobah (1982)<br />
The Swing (1984)<br />
Listen Like Thieves (1985)<br />
.<br />
.<br />
.</p>
<p dir="auto">What way can I achieve this?<br />
So the line “Albums:” is constant in the original file and every page starts with page number/band so slash is steadily presented as well.</p>
<p dir="auto">I guess somehow we can copy the texts between these two and go from there?</p>
<p dir="auto">Thank you so much and have a nice day,<br />
Viktoria</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15543/copying-contents-between-a-specific-string-and-a-character</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 19:54:19 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15543.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Apr 2018 12:03:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Copying contents between a specific string and a character on Wed, 04 Apr 2018 21:54:44 GMT]]></title><description><![CDATA[<p dir="auto">As usual, I really appreciate the answers, thank you so much to both of you for the solutions, explanations.<br />
The link to the other thread is invaluable as well to me, cheers for that.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/31453</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/31453</guid><dc:creator><![CDATA[Viktoria Ontapado]]></dc:creator><pubDate>Wed, 04 Apr 2018 21:54:44 GMT</pubDate></item><item><title><![CDATA[Reply to Copying contents between a specific string and a character on Wed, 04 Apr 2018 13:39:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/viktoria-ontapado" aria-label="Profile: viktoria-ontapado">@<bdi>viktoria-ontapado</bdi></a>, and <strong>All</strong>,</p>
<p dir="auto">Again, <strong>easy</strong> task with the help of <strong>regular</strong> expressions ;-))</p>
<p dir="auto">From your example, seemingly, the <strong>areas</strong> of text to <strong>delete</strong> must :</p>
<ul>
<li>
<p dir="auto">Begins after <strong>two consecutive</strong> line breaks ( <strong>CR LF CR LF</strong> ), so the regex <strong><code>\R\R</code></strong></p>
</li>
<li>
<p dir="auto">Ends right <strong>before</strong> the string <strong>Albums:</strong>, beginning a line, so the look-ahead <strong><code>(?=\RAlbums)</code></strong></p>
</li>
<li>
<p dir="auto">In between, we have to select the <strong>shortest</strong> range of <strong>any</strong> character(s), between these <strong>boundaries</strong>, even split on <strong>several</strong> lines, so the regex <strong><code>(?s).*?</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">So :</p>
<ul>
<li>
<p dir="auto">Possibly, add <strong>two lines breaks</strong>, at the <strong>very beginning</strong> of your list</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
</ul>
<p dir="auto">SEARCH <strong><code>\R\R(?s).*?(?=\RAlbums:)</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<ul>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Set the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Click, <strong>once</strong> on the <strong><code>Replace All</code></strong> button OR <strong>several</strong> times on the <strong><code>Replace</code></strong> button</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<hr />
<p dir="auto">So, given your list, below :</p>
<pre><code class="language-diff">

9/Maywood

Description of the band, stories and anecdotes about them, etc.

Albums:
1983 - Het beste van Maywood
1987 - Beside You
1990 - Achter De Horizon
1991 - 6 Of The Thirties

10/Talking Heads

Description of the band, stories and anecdotes about them, etc.

Albums:
Fear of Music (1979)
Remain in Light (1980)

11/Sly and the Family Stone

Description of the band, stories and anecdotes about them, etc.

Albums:
1968: Life
1969: Stand!
1971: There’s a Riot Goin’ On

12/Delaney &amp; Bonnie

Description of the band, stories and anecdotes about them, etc.

Albums:
To Bonnie from Delaney - Atco, 1970
Motel Shot - Atco, 1971
Country Life - Atco, 1972
D&amp;B Together - Columbia, 1972

13/Mother’s Finest

Description of the band, stories and anecdotes about them, etc.

Albums:
Iron Age (1981), Atlantic

14/INXS

Description of the band, stories and anecdotes about them, etc.

Albums:
Shabooh Shoobah (1982)
The Swing (1984)
Listen Like Thieves (1985)
</code></pre>
<p dir="auto">You should get the <strong>expected</strong> text :</p>
<pre><code class="language-diff">
Albums:
1983 - Het beste van Maywood
1987 - Beside You
1990 - Achter De Horizon
1991 - 6 Of The Thirties
Albums:
Fear of Music (1979)
Remain in Light (1980)
Albums:
1968: Life
1969: Stand!
1971: There’s a Riot Goin’ On
Albums:
To Bonnie from Delaney - Atco, 1970
Motel Shot - Atco, 1971
Country Life - Atco, 1972
D&amp;B Together - Columbia, 1972
Albums:
Iron Age (1981), Atlantic
Albums:
Shabooh Shoobah (1982)
The Swing (1984)
Listen Like Thieves (1985)
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto"><strong>Viktoria</strong>, I’ve just realized that <strong>Scott</strong> already gave you a solution ! Anyway, I <strong>do</strong> agree with the <strong>last</strong> sentence of his reply, too !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/31433</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/31433</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 04 Apr 2018 13:39:46 GMT</pubDate></item><item><title><![CDATA[Reply to Copying contents between a specific string and a character on Wed, 04 Apr 2018 12:17:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/viktoria-ontapado" aria-label="Profile: Viktoria-Ontapado">@<bdi>Viktoria-Ontapado</bdi></a></p>
<p dir="auto">Using the technique from <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> in <a href="https://notepad-plus-plus.org/community/topic/15482/copy-marked-text-sections" rel="nofollow ugc">this thread</a>; specifically:</p>
<p dir="auto"><code>SEARCH : (?s).*?(Your Regex)|.*</code></p>
<p dir="auto">and substituting</p>
<p dir="auto"><code>?:^(Albums:\R.*?\R)\R</code> into it for <code>Your Regex</code></p>
<p dir="auto">I was able to arrive at your desired result.</p>
<p dir="auto">So, in summary:</p>
<p dir="auto"><strong>Find what</strong> zone: <code>(?s).*?(?:^(Albums:\R.*?\R)\R)|.*</code><br />
<strong>Replace with</strong> zone: <code>\1</code><br />
<strong>Search mode</strong>: Regular expression<br />
Action: <strong>Replace</strong> or <strong>Replace All</strong><br />
Note: This is a <em>destructive</em> replacement, not a copy, so if you need the original data, make a copy of it first and then perform this operation on the copy.</p>
<p dir="auto">BTW, very nice sample data and discussion about what you wanted!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/31431</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/31431</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 04 Apr 2018 12:17:22 GMT</pubDate></item></channel></rss>