<?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[Join two lines]]></title><description><![CDATA[<p dir="auto">So Ctrl-j works when I highlight two lines. Can’t really do a Ctrl-a / Ctrl-j cause that just makes everything one line.</p>
<p dir="auto">the first line ending in 0<br />
the second line looks like this:    N 0</p>
<p dir="auto">I need to move the second line up to the end of the first line. Like this 0 N 0</p>
<p dir="auto">how can I do a find and replace in this document that 2,193 lines?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21120/join-two-lines</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 08:27:43 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21120.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 May 2021 17:58:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Join two lines on Wed, 05 May 2021 12:47:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Thanks Peter for the help.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65657</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65657</guid><dc:creator><![CDATA[bigredcherokee]]></dc:creator><pubDate>Wed, 05 May 2021 12:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to Join two lines on Tue, 04 May 2021 19:25:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">The idea of a “template” was that if people can’t follow it and create an understandable “problem statement”, no one wastes time even responding to them here.</p>
<p dir="auto">And yes, there is no way to force a template here AFAIK, but rather they would be directed to a FAQ with the templated questions.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65617</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65617</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 04 May 2021 19:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Join two lines on Tue, 04 May 2021 19:01:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bigredcherokee" aria-label="Profile: bigredcherokee">@<bdi>bigredcherokee</bdi></a> said in <a href="/post/65613">Join two lines</a>:</p>
<blockquote>
<p dir="auto">Thanks for that. Forgot to note that not all lines are problems.</p>
</blockquote>
<p dir="auto">Okay, that was partly my fault.  You said the first ends with 0 and the adjacent line looked like <code>N 0</code>, but I assumed you weren’t telling us the whole story, and since you had originally brought up manual Ctrl+J, I had assumed that it really was “every other line”</p>
<p dir="auto">You just have to add <code>0</code> to the end of the first group, to force that group to end with a 0; and replace the <code>.*</code> in the second group with the literal <code>N 0</code> to force that group to contain exact text, not the <code>.*</code> wildcard.</p>
<ul>
<li>FIND = <code>(?-s)^(.*0)\R(N 0(\R|\Z))</code></li>
</ul>
<p dir="auto">everything else stays the same</p>
<p dir="auto">So</p>
<pre><code>line 1 0
N 0
other
line 4 0
N 0
line 6 0
but doesn't join
line X 0
N 0
</code></pre>
<p dir="auto">becomes</p>
<pre><code>line 1 0 N 0
other
line 4 0 N 0
line 6 0
but doesn't join
line X 0 N 0
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1620154675313-c2d23584-cc84-49b4-897a-3ff58b0f1791-image.png" alt="c2d23584-cc84-49b4-897a-3ff58b0f1791-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Of course, if you had given example data which showed both lines that should be changed and lines that shouldn’t, we wouldn’t have had this problem.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> linked to <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> 's</p>
<blockquote>
<p dir="auto">Maybe we need a template</p>
</blockquote>
<p dir="auto">As has been proven hundreds of times in the official issues location, people won’t use the template even if it’s literally there every time they start a new issue – and this forum doesn’t have such a feature.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65615</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65615</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 04 May 2021 19:01:26 GMT</pubDate></item><item><title><![CDATA[Reply to Join two lines on Tue, 04 May 2021 18:16:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bigredcherokee" aria-label="Profile: bigredcherokee">@<bdi>bigredcherokee</bdi></a> said in <a href="/post/65613">Join two lines</a>:</p>
<blockquote>
<p dir="auto">Forgot to note that not all lines are problems.</p>
</blockquote>
<p dir="auto">LOL!!</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/topic/21107/regex-remove-headings-that-has-no-full-stop-at-the-end/10">https://community.notepad-plus-plus.org/topic/21107/regex-remove-headings-that-has-no-full-stop-at-the-end/10</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/65614</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65614</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 04 May 2021 18:16:11 GMT</pubDate></item><item><title><![CDATA[Reply to Join two lines on Tue, 04 May 2021 18:06:42 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for that. Forgot to note that not all lines are problems.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65613</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65613</guid><dc:creator><![CDATA[bigredcherokee]]></dc:creator><pubDate>Tue, 04 May 2021 18:06:42 GMT</pubDate></item><item><title><![CDATA[Reply to Join two lines on Tue, 04 May 2021 18:04:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bigredcherokee" aria-label="Profile: bigredcherokee">@<bdi>bigredcherokee</bdi></a></p>
<p dir="auto">Use regular expressions:</p>
<ul>
<li>FIND = <code>(?-s)^(.*)\R(.*(\R|\Z))</code></li>
<li>REPLACE = <code>$1 $2</code></li>
<li>REPLACE ALL</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1620151387109-715b8d1c-b810-4f8f-92b1-01924447c2f3-image.png" alt="715b8d1c-b810-4f8f-92b1-01924447c2f3-image.png" class=" img-fluid img-markdown" /><br />
=&gt;<br />
<img src="/assets/uploads/files/1620151399943-5917c599-be43-4828-899a-ac280033655f-image.png" alt="5917c599-be43-4828-899a-ac280033655f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">(because of the <code>(\R|\Z)</code>, it will work whether the last line ends with a newline or EOF)</p>
<p dir="auto">-—</p>
<p dir="auto"><em>Do you want regex search/replace help?  Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you.  All example text should be marked as literal text using the <code>&lt;/&gt;</code> toolbar button or manual <a href="https://community.notepad-plus-plus.org/topic/14262/how-to-markdown-code-on-this-forum/4">Markdown syntax</a>. To make <code>regex in red</code> (and so they keep their special characters like *), use backticks, like <code>`^.*?blah.*?\z`</code>. Screenshots can be pasted from the clipboard to your post using <code>Ctrl+V</code> to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have <strong>and</strong> the text you want to get from that data; include examples of things that <strong>should match</strong> and be transformed, <strong>and</strong> things that <strong>don’t match</strong> and should be left alone; show <strong>edge cases</strong> and make sure you examples are as <strong>varied</strong> as your real data.  Show the regex you already tried, <strong>and why</strong> you thought it should work; tell us what’s wrong with what you <strong>do</strong> get. Read the official <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">NPP Searching / Regex docs</a> and the forum’s <a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation">Regular Expression FAQ</a>. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/65612</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65612</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 04 May 2021 18:04:45 GMT</pubDate></item></channel></rss>