<?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[Select/mark all lines which contain a certain pattern and add the line above]]></title><description><![CDATA[<p dir="auto">There is already a topic but I wanted to start a new thead to “add the line above”:<br />
<a href="https://community.notepad-plus-plus.org/topic/14704/select-mark-all-lines-which-contain-a-certain-pattern">https://community.notepad-plus-plus.org/topic/14704/select-mark-all-lines-which-contain-a-certain-pattern</a></p>
<p dir="auto">I’m not sure how to copy a line using the bookmark feature yet, but I want a bookmark to be added to every line above what I have already bookmarked as a result of edit&gt;find&gt;mark&gt;bookmark line&gt;mark all.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19221/select-mark-all-lines-which-contain-a-certain-pattern-and-add-the-line-above</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 09:28:48 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19221.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Apr 2020 04:36:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Select/mark all lines which contain a certain pattern and add the line above on Tue, 14 Apr 2020 18:38:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgtsixpack" aria-label="Profile: sgtsixpack">@<bdi>sgtsixpack</bdi></a> said in <a href="/post/52596">Select/mark all lines which contain a certain pattern and add the line above</a>:</p>
<blockquote>
<p dir="auto">I don’t know about “craft an expression”<br />
I also have no clue about your last reply.</p>
</blockquote>
<p dir="auto">Sorry, I should have been more explicit.<br />
My comments were in regard to “Regular Expression” Search mode, which is typically what one is inferring when they ask “how can I manipulate data that is <em>relative</em> to some other data”.</p>
<p dir="auto">As you’ve probably discovered, you can, in Normal Search mode, bookmark the “line above” by making a selection that covers both lines, perhaps partially, and then pressing ctrl+f go get your text in the <em>Find what</em> box.  You can then switch the <em>Find</em> window to the <em>Mark</em> tab and proceed with bookmarking.</p>
<p dir="auto">But if you do it that way, you aren’t truly doing “line above”, you’re doing “line of” and “line below”. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52597</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52597</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 14 Apr 2020 18:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to Select/mark all lines which contain a certain pattern and add the line above on Tue, 14 Apr 2020 18:19:24 GMT]]></title><description><![CDATA[<p dir="auto">I just expanded my search to include the line above, not sure if this is what you meant.  I don’t know about “craft an expression”.  I also have no clue about your last reply.  My problem is solved though so thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52596</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52596</guid><dc:creator><![CDATA[sgtsixpack]]></dc:creator><pubDate>Tue, 14 Apr 2020 18:19:24 GMT</pubDate></item><item><title><![CDATA[Reply to Select/mark all lines which contain a certain pattern and add the line above on Tue, 14 Apr 2020 17:54:03 GMT]]></title><description><![CDATA[<p dir="auto">If you have already created <code>YOURREGEX</code> to mark data, if you want to bookmark the line it is on plus the line above, you could use a <em><strong>Find what</strong></em> box of:</p>
<p dir="auto"><code>(?-s)^.*\R.*?</code> and then append <code>YOURREGEX</code> to that.</p>
<p dir="auto">Example:  Bookmark line containing <code>foo</code> and then line above it:</p>
<p dir="auto">Also:  <code>(?-s)\R.*?foo</code> works but there will only be a bookmark on the “line above”, no red coloring of the text.  I like the red coloring so I prefer the first version.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52595</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52595</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 14 Apr 2020 17:54:03 GMT</pubDate></item><item><title><![CDATA[Reply to Select/mark all lines which contain a certain pattern and add the line above on Tue, 14 Apr 2020 12:08:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgtsixpack" aria-label="Profile: sgtsixpack">@<bdi>sgtsixpack</bdi></a> said in <a href="/post/52559">Select/mark all lines which contain a certain pattern and add the line above</a>:</p>
<blockquote>
<p dir="auto">how to copy a line using the bookmark feature</p>
</blockquote>
<p dir="auto"><em>Search</em> menu &gt; <em>Bookmark</em> &gt; <em>Copy Bookmarked Lines</em></p>
<blockquote>
<p dir="auto">I want a bookmark to be added to every line above what I have already bookmarked</p>
</blockquote>
<p dir="auto">You can’t do this based solely on the bookmarks.  You can, however, craft a mark search expression that will bookmark a line of interest and the line <em>above</em> that one.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52565</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52565</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 14 Apr 2020 12:08:54 GMT</pubDate></item></channel></rss>