<?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 partial replacement syntax? Grouping not working]]></title><description><![CDATA[<p dir="auto">I have tried both\ and $ to group the strings I’m trying to match and substitute.  This syntax works in other text editors, and on the web in a regex tester.  This search does find 2008 but it doesn’t replace it properly. Is there a different syntax I should be using, or is there a setting I am missing?<br />
<em>String to search for</em><br />
<strong>(\d{4})(&lt;)</strong><br />
<em>String to search in</em><br />
<strong>&lt;td&gt;2008&lt;/td&gt;</strong><br />
<em>Replacement String</em><br />
<strong>&lt;a href=“…/\1/\1.html”&gt;\1&lt;/a&gt;\2</strong><br />
<em>Result</em><br />
<strong>&lt;td&gt;&lt;a href=“…//.html”&gt;&lt;/a&gt;/td&gt;</strong><br />
<em>Desired Result</em><br />
<strong>&lt;td&gt;&lt;a href=“…/2008/2008.html”&gt;&lt;/a&gt;/td&gt;</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18102/regex-partial-replacement-syntax-grouping-not-working</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 03:07:31 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18102.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Aug 2019 13:17:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sun, 25 Aug 2019 21:51:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16163">@Pam-Rathmell</a></p>
<p dir="auto">Moving in a backward direction is tricky for regular expression engines.  It <em>mostly</em> works okay, but it does strange things often enough that even Notepad++ at one time disabled it (searching ‘up’ when the Search mode was Regular expression).  That disabling has mostly gone away now it seems.</p>
<p dir="auto">I guess you have stumbled upon one of the odd situations.</p>
<p dir="auto">I wanted to see what Pythonscript’s regular expression replacement function would do with your situation, and in trying to get it working I started with a simpler search, and I discovered that attempting to search backwards, even very simply,  gives no matches at all.  :(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46584</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46584</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 25 Aug 2019 21:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 16:24:16 GMT]]></title><description><![CDATA[<p dir="auto">Based on your question, I did some more fiddling around.  I had “backward direction” and “wrap-around” checked.  With these settings, I got a reliable failure.  When I changed it to “forward direction” it succeeded. I believe this is a bug and backward direction does not recognize the grouping.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46342</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46342</guid><dc:creator><![CDATA[Pam Rathmell]]></dc:creator><pubDate>Sat, 17 Aug 2019 16:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 16:04:03 GMT]]></title><description><![CDATA[<p dir="auto">I ended up using another text editor to make the (massive) changes.  But I’d like to know if this is actually a bug?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46341</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46341</guid><dc:creator><![CDATA[Pam Rathmell]]></dc:creator><pubDate>Sat, 17 Aug 2019 16:04:03 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 16:02:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16163">@Pam-Rathmell</a><br />
which checkboxes are actually checked in the find/replace dialog and are you aware<br />
that when the caret is after the text to be found that only wrap around checked would start searching from<br />
the beginning?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46340</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46340</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 17 Aug 2019 16:02:43 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 15:19:14 GMT]]></title><description><![CDATA[<p dir="auto">It works in one file, but not in another.  Here’s the debug info:</p>
<p dir="auto">Notepad++ v7.7.1   (64-bit)<br />
Build time : Jun 16 2019 - 21:24:47<br />
Path : D:\notepad++\notepad++.exe<br />
Admin mode : OFF<br />
Local Conf mode : OFF<br />
OS : Windows 10 (64-bit)</p>
<p dir="auto">I also tried copy and paste of the relevant text into a brand new file and that didn’t work either<br />
Plugins : mimeTools.dll NppConverter.dll</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46339</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46339</guid><dc:creator><![CDATA[Pam Rathmell]]></dc:creator><pubDate>Sat, 17 Aug 2019 15:19:14 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 14:24:13 GMT]]></title><description><![CDATA[<p dir="auto">I’m baffled.  I did the search/replace this time and it WORKED.  I had rebooted in the meantime, perhaps something was cached?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46338</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46338</guid><dc:creator><![CDATA[Pam Rathmell]]></dc:creator><pubDate>Sat, 17 Aug 2019 14:24:13 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 14:13:38 GMT]]></title><description><![CDATA[<p dir="auto">For me this work with npp7.7.1 on win7 x64.<br />
It produce the desired output because of the used regex but it does replace 2008.<br />
Could you post your debug info, which is available under the last menu item, the ? menu ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46337</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46337</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 17 Aug 2019 14:13:38 GMT</pubDate></item><item><title><![CDATA[Reply to Regex partial replacement syntax? Grouping not working on Sat, 17 Aug 2019 13:58:22 GMT]]></title><description><![CDATA[<p dir="auto">I’m using Notepad++ v7.1.1 (64 bit) on a Windows 10 Pro 64 bit computer.  brand new user and this is the out-of-the-box vanilla version.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46335</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46335</guid><dc:creator><![CDATA[Pam Rathmell]]></dc:creator><pubDate>Sat, 17 Aug 2019 13:58:22 GMT</pubDate></item></channel></rss>