<?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[Align Questions in One line.]]></title><description><![CDATA[<p dir="auto">Hi everyone… hope you can help me. Apologies for my English.</p>
<p dir="auto">I got like 1800 questions. Like this:</p>
<p dir="auto"><img src="/assets/uploads/files/1706277167488-notepad.png" alt="Notepad++.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As you can see question 295 is in one single line. But question 296 es in two lines. I have a lot of questions like that, like 296. I need all the questions to be in one single line. how can i achieve that?</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25418/align-questions-in-one-line</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 06:42:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25418.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Jan 2024 13:56:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 20:58:57 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> said in <a href="/post/92436">Align Questions in One line.</a>:</p>
<blockquote>
<p dir="auto">(?-s)^\u+).+\K\R(?!\u))(?!ANSWER)</p>
</blockquote>
<p dir="auto">I don’t know how to express gratitude on the internet. <strong>But BIG THANKS.</strong> YOU SAVED ME A LOT OF TIME.</p>
<p dir="auto"><strong>Really. THANK YOU.</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/92437</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92437</guid><dc:creator><![CDATA[Martin Martin]]></dc:creator><pubDate>Fri, 26 Jan 2024 20:58:57 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 20:51:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/martin-martin" aria-label="Profile: Martin-Martin">@<bdi>Martin-Martin</bdi></a> ,</p>
<p dir="auto">You misunderstood on one (the … wasn’t part of the expression: it wasn’t red), and I had a couple of typos (accidentally said <code>\h+</code> instead of <code>\u+</code>).</p>
<p dir="auto">I guess I should have spelled it all out, and should have tried it before posting.</p>
<p dir="auto">FIND WHAT: <code>(?-s)^\u+\).+\K\R(?!\u\))(?!ANSWER)</code></p>
<p dir="auto">converts</p>
<pre><code>1. Question 1
A) A1
second line
B) two
C) three
D)four
with another line
ANSWER
2. question two
A) A1
second line
B) two
C) three
D)four
with another line
ANSWER
</code></pre>
<p dir="auto">to</p>
<pre><code>1. Question 1
A) A1 second line
B) two
C) three
D)four with another line
ANSWER
2. question two
A) A1 second line
B) two
C) three
D)four with another line
ANSWER
</code></pre>
<p dir="auto">And if any of your choices are 3 or more lines long, just re-run the regex until it doesn’t make any more changes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/92436</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92436</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 26 Jan 2024 20:51:42 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 20:30:43 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> said in <a href="/post/92434">Align Questions in One line.</a>:</p>
<blockquote>
<p dir="auto">(?!\h+))(?!ANSWER:)</p>
</blockquote>
<p dir="auto">Sorry I’m new to this. English is not my mother tongue.</p>
<p dir="auto">I understood this?:</p>
<p dir="auto">Find: (?-s)^\u+..+\K\R(?!\h+))(?!ANSWER:))<br />
Replace: a single space<br />
Search mode: Regular expression</p>
<p dir="auto">Obviously I did something wrong because it says Invalid Regular Expression.</p>
<p dir="auto">I managed to erase some parenthesis but the result was that B options and C options dissapeared or merged in one line… I’m a complete disaster. but i managed to undo actions. Everything is fine, answers are back, but I can’t put them in one line yet.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/92435</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92435</guid><dc:creator><![CDATA[Martin Martin]]></dc:creator><pubDate>Fri, 26 Jan 2024 20:30:43 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 20:17:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/martin-martin" aria-label="Profile: Martin-Martin">@<bdi>Martin-Martin</bdi></a> said in <a href="/post/92433">Align Questions in One line.</a>:</p>
<blockquote>
<p dir="auto">did you know how to do the same, but for the Answers?</p>
</blockquote>
<p dir="auto">In the regex that <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> showed, the <code>\d+\.</code> at the beginning means “one or more digits followed by a literal dot character”.</p>
<p dir="auto">For requiring it to be one or more letters then an end-parentheses like your answers are, replace that portion of the regex with a regex that means “one or more uppercase letters followed by a literal parentheses”: <code>\u+\)</code> …</p>
<p dir="auto">Further, the <code>(?!A\))</code> says “stop the match once you hit a literal <code>A)</code>” … So the equivalent for the answer would be "stop the match once you hit a different capital(s)-then-paren, and stop if you come across <code>ANSWER:</code> -&gt; <code>(?!\h+\))(?!ANSWER:)</code></p>
<p dir="auto">Those tweaks to the original will work for your new</p>
<p dir="auto">-—</p>
<h3>Useful References</h3>
<ul>
<li><a href="https://community.notepad-plus-plus.org/topic/21965/please-read-before-posting">Please Read Before Posting</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/22022/template-for-search-replace-questions">Template for Search/Replace Questions</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">Formatting Forum Posts</a></li>
<li><a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">Notepad++ Online User Manual: Searching/Regex</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">FAQ: Where to find other regular expressions (regex) documentation</a></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/92434</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92434</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 26 Jan 2024 20:17:59 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 20:05:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a></p>
<p dir="auto"><strong>Sorry to bother</strong> you again… did you know how to do the same, but for the Answers?</p>
<p dir="auto">I mean… I have this format:</p>
<p dir="auto">A) XXXXXXXXX<br />
XXXXXX<br />
B)XXXXXXXX<br />
C)XXXXXXXX<br />
D)XXXXXX<br />
XXXXXXXX</p>
<p dir="auto">I want A and B or whatever answers in the exam to be in 1 line too, like this:</p>
<p dir="auto">A)XXXXXX<br />
B)XXXXX<br />
C)XXXXXXXXX<br />
D)XXXXXXXX</p>
]]></description><link>https://community.notepad-plus-plus.org/post/92433</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92433</guid><dc:creator><![CDATA[Martin Martin]]></dc:creator><pubDate>Fri, 26 Jan 2024 20:05:25 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 14:49:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/92412">Align Questions in One line.</a>:</p>
<blockquote>
<p dir="auto">Find: (?-s)^\d+..+\K\R(?!A))<br />
Replace: a single space<br />
Search mode: Regular expression</p>
</blockquote>
<p dir="auto"><strong>THANKS A LOT!!! BIG THANKS!!!</strong></p>
<p dir="auto">That solved my problem!!!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/92417</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92417</guid><dc:creator><![CDATA[Martin Martin]]></dc:creator><pubDate>Fri, 26 Jan 2024 14:49:05 GMT</pubDate></item><item><title><![CDATA[Reply to Align Questions in One line. on Fri, 26 Jan 2024 14:23:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/martin-martin" aria-label="Profile: Martin-Martin">@<bdi>Martin-Martin</bdi></a></p>
<p dir="auto">You could use this as a starting point:</p>
<p dir="auto">Find: <code>(?-s)^\d+\..+\K\R(?!A\))</code><br />
Replace: a single space<br />
Search mode: Regular expression</p>
]]></description><link>https://community.notepad-plus-plus.org/post/92412</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92412</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Jan 2024 14:23:34 GMT</pubDate></item></channel></rss>