<?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[regex & new line]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">I looked around but cannot find what I was lloking for, so I explain my problem:</p>
<p dir="auto">I get the BBCode of an image gallery hosted on <a href="http://www.imagebam.com/" rel="nofollow ugc">ImageBam.com </a> under this form:</p>
<p dir="auto">[URL=&lt;link to image number1&gt;][IMG]&lt;link to thumbnail number1&gt;[/IMG][/URL]<br />
[URL=&lt;link to image number2&gt;][IMG]&lt;link to thumbnail number2&gt;[/IMG][/URL]<br />
[URL=&lt;link to image number3&gt;][IMG]&lt;link to thumbnail number3&gt;[/IMG][/URL]</p>
<p dir="auto">(all on one line, evey link separated by a space)</p>
<p dir="auto">I paste this in Notepad++ and use the regex FIND: "[/URL] ", REPLACE: “[/URL] \n”, so I get every link on a separate line (I need this for an easy classification).<br />
Then I want to put back groups of several links on one line, and I try to use the regex FIND: “\n[URL=”, REPLACE: “[URL=”.<br />
My problem is here: the replace window says that X occurrences have been replaced, but the display does not change. IF I do it a second time, it says that 0 occurrences have been replaced, so something must have been changed, but it is not possible to see it, and when I paste the result in the forum, I can see that the new lines have not ben removed.<br />
Thus, I know that this regex works fine, because it works fine when I try to do it in the Wikipedia wikicode editor (with a special gadget that allows to do regex “find and replace” ).</p>
<p dir="auto">Can someone please explain me what I could have done wrong, or a better way to do what I want with Notepad++?</p>
<p dir="auto">TLDR: how can I remove some “new lines” with regexes?</p>
<p dir="auto">Excuse me if my explanations can seem a little bit confuse, but English is not my mother language and it is difficult for me to explain technical things…</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12016/regex-new-line</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 06:29:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12016.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Jun 2016 08:56:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to regex & new line on Tue, 28 Jun 2016 20:22:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andova-begarin" aria-label="Profile: Andova-Begarin">@<bdi>Andova-Begarin</bdi></a> said:</p>
<blockquote>
<p dir="auto">Try it without regular expression checked, and with Extended (\n …) checked.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said:</p>
<blockquote>
<p dir="auto">Hello <strong>Oli Vier</strong>,</p>
<p dir="auto">I <strong>quite</strong> understood your post, although it’s not your <strong>mother</strong> language ( nor <strong>mine</strong> ! ) I tested your <strong>regexes</strong> and the did work <strong>nicely</strong> ! So, I suppose it should be a <strong>silly</strong> problem of <strong>options</strong>, in the <strong>Replace</strong> dialog !</p>
<p dir="auto">guy038</p>
</blockquote>
<p dir="auto">Спасибо Andova &amp; merci Guy ;)<br />
It actually works better if “Extended (\n, \r, \t \0, \x…)” is checked.<br />
I didn’t try this option because I do not use Notepad++ very often and I didn’t knew the use of this “Extended” option.<br />
I am not really a programmer and I learnt regexes to have a better use of AutoWikiBrowser, an automated wiki editor, so I have only a basic knowledge of it.</p>
<p dir="auto">Regards</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16608</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16608</guid><dc:creator><![CDATA[Oli Vier]]></dc:creator><pubDate>Tue, 28 Jun 2016 20:22:32 GMT</pubDate></item><item><title><![CDATA[Reply to regex & new line on Tue, 28 Jun 2016 17:15:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello <strong>Oli Vier</strong>,</p>
<p dir="auto">I <strong>quite</strong> understood your post, although it’s not your <strong>mother</strong> language ( nor <strong>mine</strong> ! ) I tested your <strong>regexes</strong> and the did work <strong>nicely</strong> ! So, I suppose it should be a <strong>silly</strong> problem of <strong>options</strong>, in the <strong>Replace</strong> dialog !</p>
<p dir="auto">Of course, as I, generally, work with <strong>Windows</strong> files, I used the <strong><code>\r\n</code></strong> form, instead of the <strong>Unix</strong> End of Line <strong><code>\n</code></strong></p>
<hr />
<p dir="auto">So let’s suppose that you have, for instance, the text, below, in an <strong>unique long</strong> line, in a <strong>new</strong> tab :</p>
<pre><code>[URL=&lt;link to image number1&gt;][IMG]&lt;link to thumbnail number1&gt;[/IMG][/URL][URL=&lt;link to image number2&gt;][IMG]&lt;link to thumbnail number2&gt;[/IMG][/URL][URL=&lt;link to image number3&gt;][IMG]&lt;link to thumbnail number3&gt;[/IMG][/URL][URL=&lt;link to image number4&gt;][IMG]&lt;link to thumbnail number4&gt;[/IMG][/URL][URL=&lt;link to image number5&gt;][IMG]&lt;link to thumbnail number5&gt;[/IMG][/URL][URL=&lt;link to image number6&gt;][IMG]&lt;link to thumbnail number6&gt;[/IMG][/URL][URL=&lt;link to image number7&gt;][IMG]&lt;link to thumbnail number7&gt;[/IMG][/URL][URL=&lt;link to image number8&gt;][IMG]&lt;link to thumbnail number8&gt;[/IMG][/URL][URL=&lt;link to image number9&gt;][IMG]&lt;link to thumbnail number9&gt;[/IMG][/URL]
</code></pre>
<ul>
<li>
<p dir="auto">Open the <strong>Replace dialog</strong> ( <strong>CTRL + H</strong> )</p>
</li>
<li>
<p dir="auto">Set the <strong><code>Extended (\n, \r, \t \0, \x...)</code></strong> search mode ( <strong>IMPORTANT</strong> )</p>
</li>
<li>
<p dir="auto"><strong>Uncheck</strong> the <strong>Match whole word only</strong> option, if necessary</p>
</li>
<li>
<p dir="auto"><strong>Check</strong> the <strong>Match case</strong> option, if necessary</p>
</li>
<li>
<p dir="auto">Select the <strong>Down</strong> direction, if necessary</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>[/URL]</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>[/URL]\n</code></strong></p>
</li>
<li>
<p dir="auto">Click on the <strong>Replace All</strong> button</p>
</li>
</ul>
<p dir="auto">=&gt; You obtain , now, the text below :</p>
<pre><code>[URL=&lt;link to image number1&gt;][IMG]&lt;link to thumbnail number1&gt;[/IMG][/URL]
[URL=&lt;link to image number2&gt;][IMG]&lt;link to thumbnail number2&gt;[/IMG][/URL]
[URL=&lt;link to image number3&gt;][IMG]&lt;link to thumbnail number3&gt;[/IMG][/URL]
[URL=&lt;link to image number4&gt;][IMG]&lt;link to thumbnail number4&gt;[/IMG][/URL]
[URL=&lt;link to image number5&gt;][IMG]&lt;link to thumbnail number5&gt;[/IMG][/URL]
[URL=&lt;link to image number6&gt;][IMG]&lt;link to thumbnail number6&gt;[/IMG][/URL]
[URL=&lt;link to image number7&gt;][IMG]&lt;link to thumbnail number7&gt;[/IMG][/URL]
[URL=&lt;link to image number8&gt;][IMG]&lt;link to thumbnail number8&gt;[/IMG][/URL]
[URL=&lt;link to image number9&gt;][IMG]&lt;link to thumbnail number9&gt;[/IMG][/URL]
</code></pre>
<ul>
<li>
<p dir="auto">Place the cursor, for instance, at the <strong>beginning</strong> of the line, relative to <strong>number3</strong></p>
</li>
<li>
<p dir="auto"><strong>Hold</strong> down the <strong>Shift</strong> key and press, <strong>five</strong> times, on the <strong>Down</strong> arrow</p>
</li>
</ul>
<p dir="auto">=&gt; The lines, relative to <strong>number3</strong>, <strong>number4</strong>, <strong>number5</strong>, <strong>number6</strong> and <strong>number7</strong>, are <strong>selected</strong></p>
<p dir="auto">=&gt; The <strong>cursor</strong> should be located at the <strong>beginning</strong> of the <strong>non-selected</strong> line, relative to <strong>number8</strong></p>
<ul>
<li>
<p dir="auto">Now, open, again, the <strong>Replace dialog</strong> ( <strong>CTRL + H</strong> )</p>
</li>
<li>
<p dir="auto">Select the <strong>same</strong> options, as in the <strong>previous</strong> S/R</p>
</li>
<li>
<p dir="auto">Check the <strong>In selection</strong> option  ( <strong>IMPORTANT</strong> )</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>\n[URL=</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>[URL=</code></strong></p>
</li>
<li>
<p dir="auto">Click on the <strong>Replace All</strong> button</p>
</li>
</ul>
<p dir="auto">=&gt; You should get, this time, the text below :</p>
<pre><code>[URL=&lt;link to image number1&gt;][IMG]&lt;link to thumbnail number1&gt;[/IMG][/URL]
[URL=&lt;link to image number2&gt;][IMG]&lt;link to thumbnail number2&gt;[/IMG][/URL]
[URL=&lt;link to image number3&gt;][IMG]&lt;link to thumbnail number3&gt;[/IMG][/URL][URL=&lt;link to image number4&gt;][IMG]&lt;link to thumbnail number4&gt;[/IMG][/URL][URL=&lt;link to image number5&gt;][IMG]&lt;link to thumbnail number5&gt;[/IMG][/URL][URL=&lt;link to image number6&gt;][IMG]&lt;link to thumbnail number6&gt;[/IMG][/URL][URL=&lt;link to image number7&gt;][IMG]&lt;link to thumbnail number7&gt;[/IMG][/URL]
[URL=&lt;link to image number8&gt;][IMG]&lt;link to thumbnail number8&gt;[/IMG][/URL]
[URL=&lt;link to image number9&gt;][IMG]&lt;link to thumbnail number9&gt;[/IMG][/URL]
</code></pre>
<p dir="auto">And it’s easy to verify that :</p>
<ul>
<li>
<p dir="auto">The <strong>previous non-selected</strong> lines, relative to <strong>number1</strong>, <strong>number2</strong>, <strong>number8</strong> and <strong>number9</strong>, did <strong>not</strong> change</p>
</li>
<li>
<p dir="auto">The <strong>selected</strong> lines, relative to <strong>number3</strong>, <strong>number4</strong>, <strong>number5</strong>, <strong>number6</strong> and <strong>number7</strong>, have been <strong>joined</strong>, together, in an <strong>unique</strong> line</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16603</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16603</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 28 Jun 2016 17:15:36 GMT</pubDate></item><item><title><![CDATA[Reply to regex & new line on Mon, 27 Jun 2016 11:16:40 GMT]]></title><description><![CDATA[<p dir="auto">Try it without regular expression checked, and with Extended (\n …) checked.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16583</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16583</guid><dc:creator><![CDATA[Andova Begarin]]></dc:creator><pubDate>Mon, 27 Jun 2016 11:16:40 GMT</pubDate></item></channel></rss>