<?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 Replace  button doesn&#x27;t work as expected with a look-behind.]]></title><description><![CDATA[<p dir="auto">Today I found that when using the “Replace” button when using a positive lookahead and a capture group Notepad++ doesn’t replace anything.  It only iterates through like “Find Next”.</p>
<p dir="auto">For example in the Changelog for the latest version If I wanted to remove the new lines between all the plugin versions with a regex.<br />
Excerpt from Changelog to remove newline characters:<br />
"</p>
<ol>
<li>NppExport v0.2.8</li>
<li>Plugin Manager 1.3.5</li>
<li>Converter 3.0</li>
<li>Mime Tool 1.9<br />
"<br />
use the regex: (?&lt;=.\d)(\r\n)<br />
Set the replace with as a space or comma.</li>
</ol>
<p dir="auto">If I press “Replace All”  the replace works on all 4 lines as expected.  But, if I just try the “Replace” no replacements are made.<br />
If I don’t use a lookahead the “Replace” button works as expected.</p>
<p dir="auto">Is there a reason for this behavior?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12363/regex-replace-button-doesn-t-work-as-expected-with-a-look-behind</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 12:23:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12363.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Sep 2016 04:28:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegEx Replace  button doesn&#x27;t work as expected with a look-behind. on Thu, 15 Sep 2016 14:28:05 GMT]]></title><description><![CDATA[<p dir="auto">Title updated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17923</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17923</guid><dc:creator><![CDATA[dail]]></dc:creator><pubDate>Thu, 15 Sep 2016 14:28:05 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx Replace  button doesn&#x27;t work as expected with a look-behind. on Thu, 15 Sep 2016 14:22:05 GMT]]></title><description><![CDATA[<p dir="auto">Scott,<br />
You are correct on the title of the post.   I posted too late, and did mean the look-behind as you mentioned.   When i tried to edit the post, I was given an error stating it can only be edited withing 180 seconds.      I’ll poke around a bit, and see if I have any luck to correct the title.</p>
<p dir="auto">Guy038 thanks for the response.   I did notice that other regex did appear to work.   Was curious why the look behind didn’t work.</p>
<p dir="auto">Thanks again.</p>
<p dir="auto">Joe–</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17922</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17922</guid><dc:creator><![CDATA[Joe Furlong]]></dc:creator><pubDate>Thu, 15 Sep 2016 14:22:05 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx Replace  button doesn&#x27;t work as expected with a look-behind. on Thu, 15 Sep 2016 12:28:05 GMT]]></title><description><![CDATA[<p dir="auto">Reading this posting, it strikes me that perhaps the title should be</p>
<p dir="auto"><strong>“RegEx Replace button doesn’t work as expected with a look-behind.”</strong></p>
<p dir="auto">rather than</p>
<p dir="auto">“RegEx Replace button doesn’t work as expected with a positive lookahead.”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17921</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17921</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 15 Sep 2016 12:28:05 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx Replace  button doesn&#x27;t work as expected with a look-behind. on Wed, 14 Sep 2016 19:30:59 GMT]]></title><description><![CDATA[<p dir="auto">Hello <strong>Joe</strong>,</p>
<p dir="auto">The behaviour of the N++ regex engine is <strong>quite bugged</strong>, if your regex contains <strong>“backward”</strong> assertions, as <strong><code>\A</code></strong> or <strong>look-behind</strong>, as <strong><code>(?&lt;=xxx)</code></strong> and also if you use the <strong><code>\K</code></strong> syntax . In that case, the <strong>step by step</strong> replacement, with the <strong>Replace</strong> button, will <strong>NEVER</strong> work :-(( Therefore, you must use the <strong>Replace All</strong> button, <strong>exclusively</strong> !</p>
<p dir="auto">Just note that “<strong>forward</strong>” assertions, as <strong><code>\z</code></strong> and <strong>positive</strong> or <strong>negative look-ahead</strong>, as <strong><code>(?=xxxx)</code></strong> or <strong><code>(?!xxxx)</code></strong>, work <strong>fine</strong> and that the use of the <strong>Replace</strong> button is effective !</p>
<hr />
<p dir="auto">BTW, <strong>many thanks</strong> to you for your <strong>regex</strong>, as a reply to <strong>greg marshall</strong>. Refer to the address, below :</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/12362/duplicate-rows-according-to-whats-in-a-column/4" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/12362/duplicate-rows-according-to-whats-in-a-column/4</a></p>
<p dir="auto">Indeed, it helped me to find out a <strong>general</strong> regex, to get all the work done, in <strong>one go</strong> !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17914</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17914</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 14 Sep 2016 19:30:59 GMT</pubDate></item></channel></rss>