<?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[Negative lookbehind regular expression not working on Notepad++]]></title><description><![CDATA[<p dir="auto">This Regular Expression helped skip finding the <code>&lt;code\s*style="background-color:\s*transparent;"[^&gt;]*&gt;</code> if it was preceded by <code>&lt;p.......color: black...&gt;(any white spaces, including if they were on the next line)&lt;span.......&gt;</code>, or <code>&lt;span.......color: black...&gt;</code> and found other strings of <code>&lt;code\s*style="background-color:\s*transparent;"[^&gt;]*&gt;</code> on <a href="https://regex101.com" rel="nofollow ugc">https://regex101.com</a> (see <a href="https://regex101.com/r/w6CE1U/7" rel="nofollow ugc">https://regex101.com/r/w6CE1U/7</a> for evidence):-</p>
<p dir="auto"><code>(?&lt;!&lt;span\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*)(?&lt;!&lt;p\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*&lt;span\b[^&gt;]*&gt;\s*)&lt;code\s*style="background-color:\s*transparent;"&gt;</code><br />
when I used this block for testing:-</p>
<pre><code>&lt;html&gt;
&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: black; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: cyan;"&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; background-color: cyan;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;

&lt;code style="background-color: transparent;"&gt;

&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: cyan; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: cyan;"&gt;&lt;span style="color: black; font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; background-color: cyan;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;
&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: cyan; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: navy;"&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">However, it is giving me an, “Invalid regular expression” error message on Notepad++. What to do?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26792/negative-lookbehind-regular-expression-not-working-on-notepad</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 06:30:36 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26792.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Apr 2025 16:13:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 20:43:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> Oui, merci beaucoup!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101283</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101283</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sun, 27 Apr 2025 20:43:26 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 19:16:45 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah, I just having some <strong>spare</strong> time to answer your <strong>specific</strong> problem !</p>
<p dir="auto">As I said in a <strong>previous</strong> post, you <strong>cannot</strong> use <strong>look-behinds</strong> as they do <em>NOT</em> support <strong>variable</strong> quantifiers ! That’s why I proposed a method with the <strong><code>((SKIP)(*F)</code></strong> feature, which works <strong>properly</strong>.</p>
<hr />
<p dir="auto">In order to found out <strong>other</strong> methods, let’s begin with a <strong>simplified</strong> problem :</p>
<p dir="auto">Starting with this <em>INPUT</em> text :</p>
<pre><code class="language-diff">DEF  ABCDEF   ABC     DEF  ABCDEF   XYZDEF   ABCDEF
</code></pre>
<p dir="auto">The following <strong>regex</strong> S/R :</p>
<p dir="auto">FIND <strong><code>(?-is)ABCDEF(*SKIP)(*F)|DEF</code></strong></p>
<p dir="auto">REPLACE <strong><code>12345</code></strong></p>
<p dir="auto">Matches <strong>only</strong> the <strong>DEF</strong> string when <em>NOT</em> preceded with the <strong><code>ABC</code></strong> string</p>
<p dir="auto">After the <strong>replacement</strong>, we get this <em>OUTPUT</em> :</p>
<pre><code class="language-diff">12345  ABCDEF   ABC     12345  ABCDEF   XYZ12345   ABCDEF
</code></pre>
<ul>
<li>
<p dir="auto">If <strong><code>DEF</code></strong> is preceded by <strong><code>ABC</code></strong>, <strong>NO</strong> replacement occurs</p>
</li>
<li>
<p dir="auto">If <strong><code>DEF</code></strong> is <em>NOT</em> preceded by <strong><code>ABC</code></strong> it replaces the string <strong><code>DEF</code></strong> by the string <strong><code>12345</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">Now, using the <strong>same</strong> <em>INPUT</em> text :</p>
<p dir="auto">The following <strong>regex</strong> S/R :</p>
<p dir="auto">FIND <strong><code>(?-is)ABCDEF\K|(DEF)</code></strong></p>
<p dir="auto">REPLACE <strong><code>?{1}12345</code></strong></p>
<ul>
<li>
<p dir="auto">Detect an <strong>empty</strong> match, when the <strong><code>DEF</code></strong> string is preceded by the <strong><code>ABC</code></strong> string</p>
</li>
<li>
<p dir="auto">Detect some <strong>selected</strong> text, when the <strong><code>DEF</code></strong> string is <em>NOT</em> preceded by the <strong><code>ABC</code></strong> string</p>
</li>
</ul>
<p dir="auto">But, due to the <strong>group</strong>, in the <strong>final</strong> part of the regex and due to the <strong>conditional</strong> replacement, it would produce this <em>OUTPUT</em> :</p>
<pre><code class="language-diff">12345  ABCDEF   ABC     12345  ABCDEF   XYZ12345   ABCDEF
</code></pre>
<p dir="auto">As previously :</p>
<ul>
<li>
<p dir="auto">if <strong><code>DEF</code></strong> is preceded by <strong><code>ABC</code></strong>, <strong>NO</strong> replacement occurs</p>
</li>
<li>
<p dir="auto">if <strong><code>DEF</code></strong> is NOT preceded by <strong><code>ABC</code></strong> it replaces the string <strong><code>DEF</code></strong> by the string <strong><code>12345</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">Let’s apply this <strong>new</strong> regex S/R to your problem. Thus, from this regex :</p>
<p dir="auto">FIND <strong><code>(?:&lt;span\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*|&lt;p\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*&lt;span\b[^&gt;]*&gt;\s*)&lt;code\s*style="background-color:\s*transparent;"&gt;(*SKIP)(*F)|&lt;code\s*style="background-color:\s*transparent;"&gt;</code></strong></p>
<p dir="auto">If we simply <strong>replace</strong> the <strong><code>(*SKIP)(*F)</code></strong> part by <strong><code>\K</code></strong> <em>AND</em> if we put all the <strong>right</strong> branch of the alternative within a <strong>group</strong>, this S/R becomes as :</p>
<p dir="auto">FIND <strong><code>(?:&lt;span\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*|&lt;p\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*&lt;span\b[^&gt;]*&gt;\s*)&lt;code\s*style="background-color:\s*transparent;"&gt;\K|(&lt;code\s*style="background-color:\s*transparent;"&gt;)</code></strong></p>
<p dir="auto">REPLACE <strong><code>?1[REPLACED text]</code></strong></p>
<p dir="auto">When just searching, the <strong>non-interesting</strong> matches will be notified as an <strong>empty</strong> match and the <strong>correct</strong> matches will be notified as <strong>selected</strong> text.</p>
<p dir="auto">And if a <strong>global</strong> replacement occur, with the <strong><code>Replace All</code></strong> button, this regex would just replace the <strong>same</strong> occurrences as with the <strong><code>(*SKIP)(*F)</code></strong> method !</p>
<p dir="auto">Try against your <em>INPUT</em> text, pasted in a <strong>new</strong> tab : you should get <strong><code>2</code></strong> <strong>empty</strong> matchs and <strong><code>4</code></strong> <strong>selected</strong> range of characters. And, after replacement you’ll left with <strong>four</strong> zones <strong><code>[REPLACED text]</code></strong>.</p>
<pre><code class="language-html">&lt;html&gt;
&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: black; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: cyan;"&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;•••••&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; background-color: cyan;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;


&lt;code style="background-color: transparent;"&gt;


&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: cyan; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: cyan;"&gt;&lt;span style="color: black; font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;•••••&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;


&lt;span&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; background-color: cyan;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;


&lt;p style="font-family: &amp;quot;verdana&amp;quot;; font-size: 18px; color: cyan; line-height: 18px; text-align: justify; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: navy;"&gt;&lt;span style="font-size: 13.5pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;code style="background-color: transparent;"&gt;&lt;b&gt;some text here&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/html&gt;
</code></pre>
<hr />
<p dir="auto">Now, it’s <strong>not</strong> the end of the story ! Imagine that, against the same <em>INPUT</em> text, below :</p>
<pre><code class="language-diff">DEF  ABCDEF   ABC     DEF  ABCDEF   XYZDEF   ABCDEF
</code></pre>
<p dir="auto">We use this <strong>simplified</strong> regex S/R :</p>
<p dir="auto">FIND <strong><code>(?-is)ABC\KDEF|(DEF)</code></strong></p>
<p dir="auto">REPLACE <strong><code>?{1}12345</code></strong></p>
<p dir="auto">Note that, this time, the <strong><code>\K</code></strong> is placed <strong>before</strong> the string <strong><code>DEF</code></strong></p>
<p dir="auto">So, it would match any string <strong><code>DEF</code></strong>, whatever it’s preceded or <em>NOT</em> by the <strong><code>ABC</code></strong> string</p>
<p dir="auto">But, due to the <strong>group</strong>, in the <strong>final</strong> part of the regex and due to the <strong>conditional</strong> replacement, We would get this new <em>OUTPUT</em> text, after a click on the <strong><code>Replace All</code></strong> button</p>
<pre><code class="language-diff">12345  ABC   ABC     12345  ABC   XYZ12345   ABC
</code></pre>
<ul>
<li>
<p dir="auto">if <strong><code>DEF</code></strong> is preceded by <strong><code>ABC</code></strong>, it replaces the string <strong><code>ABCDEF</code></strong>  by the string <strong><code>ABC</code></strong></p>
</li>
<li>
<p dir="auto">if <strong><code>DEF</code></strong> is <strong>NOT</strong> preceded by <strong><code>ABC</code></strong> it replaces the string <strong><code>DEF</code></strong> by the string <strong><code>12345</code></strong></p>
</li>
</ul>
<p dir="auto">This S/R is a <strong>variant</strong> of the <strong>previous</strong> one which may interest you in some cases !</p>
<hr />
<p dir="auto">In short, I <strong>cannot</strong> imagine, presently, other methods than the <strong>two</strong> above, with <strong><code>(SKIP)(*F)</code></strong> or <strong><code>\K</code></strong></p>
<p dir="auto">Remember, that the <strong>look-arounds</strong> structure does <strong>not</strong> seem appropriate to your <strong>style</strong> of search !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101282</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101282</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 27 Apr 2025 19:16:45 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 15:46:06 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> That RegEx should be <code>(?=(?=(?'a'[\s\S]*))(?'b'eat_(?:apple|pear|orange)_(?=\k'a'\z)|(?&lt;=(?=x^|(?&amp;b))[\s\S])))today|yesterday</code> - I corrected it on stackoverflow but my edit is awaiting moderation (others can see it with my corrections only after my edit gets approved). For your information, those are positive look behinds with a capture group named ‘a’ and a capture group named ‘b’ and need to be changed to negative look behinds. I am unable to skip anything with <a href="https://regex101.com/r/2d5IL6/2" rel="nofollow ugc">this</a> or <a href="https://regex101.com/r/2d5IL6/4" rel="nofollow ugc">this</a>. I want the result to be like in post#16</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101277</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101277</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sun, 27 Apr 2025 15:46:06 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 12:29:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said:</p>
<blockquote>
<p dir="auto">The answer by User Doqnach mentioned at … can be used as an example.</p>
</blockquote>
<p dir="auto">Well, trying that (<code>/(?=(?=(?'a'[\s\S]*))(?'b'eat_(?:apple|pear|orange)_(?=\k'a'\z)|(?&lt;=(?=x^|(?&amp;b))[\s\S])))today|yesterday</code>) in Notepad++ yields:</p>
<p dir="auto"><img src="/assets/uploads/files/1745756887054-bf2380ce-2d50-4d34-8670-d833b3f43479-image.png" alt="bf2380ce-2d50-4d34-8670-d833b3f43479-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">This is an error message I don’t think I’ve seen before.</p>
<p dir="auto">Note that I tried it on a smallish file where nothing would have matched.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101276</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101276</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 27 Apr 2025 12:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 12:21:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>  The answer by User Doqnach mentioned at <a href="https://stackoverflow.com/questions/25563891/variable-length-look-behind" rel="nofollow ugc">https://stackoverflow.com/questions/25563891/variable-length-look-behind</a> can be used as an example.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101275</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101275</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sun, 27 Apr 2025 12:21:35 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 11:33:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said:</p>
<blockquote>
<p dir="auto"><a href="http://www.drregex.com/2019/02/variable-length-lookbehinds-actually.html?m=1" rel="nofollow ugc">www.drregex.com/2019/02/variable-length-lookbehinds-actually.html?m=1</a></p>
</blockquote>
<p dir="auto">Doesn’t appear to be a valid link, in fact, it seems to point back to the N++ Community site??</p>
<p dir="auto"><a href="http://www.drregex.com/2019/02/variable-length-lookbehinds-actually.html" rel="nofollow ugc">THIS</a> is probably the correct link.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101273</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101273</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 27 Apr 2025 11:33:30 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sun, 27 Apr 2025 11:55:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> you can use the idea mentioned at <a href="www.drregex.com/2019/02/variable-length-lookbehinds-actually.html?m=1">www.drregex.com/2019/02/variable-length-lookbehinds-actually.html?m=1</a> if you please, for the above RegEx. <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> can include that formula in the Notepad++ manual also, if he pleases.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101272</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101272</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sun, 27 Apr 2025 11:55:24 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sat, 26 Apr 2025 17:23:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> So, if you have an alternative method to the <code>(*SKIP)(*FAIL)</code> method for the block posted right at the top of this thread for testing to match the same string you posted in post#16 above, please post it here</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101268</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101268</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sat, 26 Apr 2025 17:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Sat, 26 Apr 2025 13:20:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><strong>Peter</strong>, Done ! Refer to :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/topic/26812/generic-regex-how-to-use-the-couple-of-backtracking-control-verbs-skip-fail-or-skip-f-in-regexes">https://community.notepad-plus-plus.org/topic/26812/generic-regex-how-to-use-the-couple-of-backtracking-control-verbs-skip-fail-or-skip-f-in-regexes</a></p>
<p dir="auto">I also <strong>added</strong> a <strong>link</strong> to this post in your <strong><code>FAQ: Generic Regular Expression (regex) Formulas</code></strong> post.</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101267</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101267</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 26 Apr 2025 13:20:35 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Thu, 24 Apr 2025 16:50:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> I will understand it only after you post that regular expression (RegEx) here</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101234</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101234</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 24 Apr 2025 16:50:45 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Thu, 24 Apr 2025 13:51:59 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a>,</p>
<p dir="auto">When I said :</p>
<blockquote>
<p dir="auto">To propose <strong>alternatives</strong> to the <strong><code>(*SKIP)(*F)</code></strong> syntax when it’s possible !</p>
</blockquote>
<p dir="auto">I’m not talking about a work-around, using a <strong>several-steps</strong> regex, but, indeed, other <strong>direct</strong> regexes, without the <strong><code>(*SKIP)(*F)</code></strong> syntax, which are, sometimes, even <strong>shorter</strong> !</p>
<p dir="auto">You’ll understand what I mean., sooner !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101226</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101226</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 24 Apr 2025 13:51:59 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Thu, 24 Apr 2025 13:20:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> please create the blog to show how to use the <code>(*SKIP)(*FAIL)</code> regular expression, not an alternative to it. <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> may be able to create an alternative to it. If <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> wants to still use his method for what I have typed as my block for testing, he can do it in 2 parts; first using the regular expression, <code>(&lt;span\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*|&lt;p\b[^&gt;]*?color\s*:\s*black[^&gt;]*&gt;\s*&lt;span\b[^&gt;]*&gt;\s*)\K(&lt;code\s*style="background-color:\s*transparent;"&gt;)</code> in the find field and a unique string (say for example, a unique name like, “Czeslawski”) in the replace field, he can replace the <code>&lt;code\s*style="background-color:\s*transparent;"&gt;</code> with that unique string. Then he can do what is needed to the other strings of <code>&lt;code\s*style="background-color:\s*transparent;"&gt;</code> and then again replace the unique string (“Czeslawski” in this case) with <code>&lt;code\s*style="background-color:\s*transparent;"&gt;</code>. If it is something simple, this example should be sufficient: <a href="https://stackoverflow.com/questions/17286667/regular-expression-using-negative-lookbehind-not-working-in-notepad" rel="nofollow ugc">https://stackoverflow.com/questions/17286667/regular-expression-using-negative-lookbehind-not-working-in-notepad</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/101220</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101220</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 24 Apr 2025 13:20:52 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Thu, 24 Apr 2025 10:38:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">OK. I going to prepare a <strong>blog</strong> post regarding the <strong><code>(*SKIP)(*F)</code></strong> feature !</p>
<p dir="auto">However, be <strong>patient</strong> because I’ll try, first  :</p>
<ul>
<li>
<p dir="auto">To find out some <strong>other</strong> pertinent examples from various <strong>regex</strong> sites</p>
</li>
<li>
<p dir="auto">To propose <strong>alternatives</strong> to the <strong><code>(*SKIP)(*F)</code></strong> syntax when it’s possible !</p>
</li>
</ul>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101218</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101218</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 24 Apr 2025 10:38:11 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Wed, 23 Apr 2025 13:56:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a></p>
<p dir="auto">Peter’s last point (which you missed) was that lookaheads are best done with native regex syntax, because it is more obvious that way.</p>
<p dir="auto">And he probably would have confused you less if he had left out <code>(negative or positive)</code> from his sentence; doing that doesn’t change the meaning.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101193</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101193</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 23 Apr 2025 13:56:15 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Wed, 23 Apr 2025 13:14:19 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> The (*SKIP)(*F) method can be of variable width but it can be used only for negative look aheads and negative look behinds</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101189</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101189</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Wed, 23 Apr 2025 13:14:19 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Wed, 23 Apr 2025 13:01:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said in <a href="/post/101175">Negative lookbehind regular expression not working on Notepad++</a>:</p>
<blockquote>
<p dir="auto">The wonderful thing about the (*SKIP)(*F) method is that it can be used for negative look aheads also like this</p>
</blockquote>
<p dir="auto">But pointless, because lookaheads (negative or positive) can have variable width, so if you want a lookahead, just use a lookahead.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101187</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101187</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 23 Apr 2025 13:01:34 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Wed, 23 Apr 2025 10:47:36 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> The wonderful thing about the (*SKIP)(*F) method is that it can be used for negative look aheads also like this:-</p>
<pre><code>(MAIN Regex Search)(String1|String2)(*SKIP)(*F)|(MAIN Regex Search)
                                               |
&lt;------------- What I want to SKIP ------------&gt;&lt;-What I want to MATCH-&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/101175</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101175</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Wed, 23 Apr 2025 10:47:36 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Wed, 23 Apr 2025 10:00: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> We can add another line below the above RegEx explanation like this (to explain it better):-</p>
<pre><code>&lt;------------- What I want to SKIP ------------&gt;&lt;- What I want to MATCH -&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/101172</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101172</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Wed, 23 Apr 2025 10:00:57 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Tue, 22 Apr 2025 23:36:54 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> I have understood what <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> is trying to convey (and I have been using it). A template would be useful and this is an example: <code>(xyz)(*SKIP)(*F)|(z)</code> is like a negative look behind which skips finding any <code>z</code> if it is preceded by <code>y</code> or <code>x</code> (the order of the  <code>x</code> and <code>y</code>  need not be the same) but finds all other occurrences of <code>z</code> - post no.16 shows how he used it for the block I typed for testing at the top of this thread</p>
<p dir="auto">I would prefer a template like this:-</p>
<pre><code>(String1|String2)(MAIN Regex Search)(*SKIP)(*F)|(MAIN Regex Search)
                                               |
&lt;------------- This I do NOT want ------------&gt;&lt;- This I DO want -&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/101165</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101165</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Tue, 22 Apr 2025 23:36:54 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Tue, 22 Apr 2025 19:31:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said in <a href="/post/101155">Negative lookbehind regular expression not working on Notepad++</a>:</p>
<blockquote>
<p dir="auto">you could mainly use the general template, below :</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> , that’s an awesome template.</p>
<p dir="auto">I highly encourage you to write up a short <a href="/category/3/blogs">blog</a> post about it, and then link to that new post from the <a href="/topic/22673">Generic Regex Formula FAQ</a>, because I think that’s a formula that could end up being useful.</p>
<p dir="auto">(I would just link to your post in here, but the focus is this particular example, which I think would be too complicated for most readers to understand.  Doing a simpler example in the blog would be useful, I think, to help people translate your “template” into a real regex.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101164</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101164</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 22 Apr 2025 19:31:47 GMT</pubDate></item><item><title><![CDATA[Reply to Negative lookbehind regular expression not working on Notepad++ on Tue, 22 Apr 2025 18:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said in <a href="/post/101157">Negative lookbehind regular expression not working on Notepad++</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> You may want to study what is mentioned at <a href="https://www.rexegg.com/regex-lookarounds.php" rel="nofollow ugc">https://www.rexegg.com/regex-lookarounds.php</a> to understand how to use your method of regular expression for multiple negative look behinds. This is the specific regular expression I believe can help: <code>(?&lt;=(?&lt;!(?&lt;!X)_)_)\d+</code></p>
</blockquote>
<p dir="auto">Please explain why as I am not a believer.</p>
<p dir="auto">To be more explicit in detail, you have an issue and now you consider nested within nested within nested regular expression is a solution to your problem?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101160</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101160</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 22 Apr 2025 18:58:45 GMT</pubDate></item></channel></rss>