<?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[Developing generic regex sequences]]></title><description><![CDATA[<p dir="auto">Regulars Community Forum contributors,</p>
<p dir="auto">Let’s use this thread when we want to spin off from a normal question to develop a generic regex sequence.</p>
<p dir="auto">After going through some debug and back-and-forth here, a “truly generic” regex can be spun off into its own blog post, where it can be described, and an example can be shown of how to use the generic to get specific results =&gt; this spun-off blog could then have a format similar to <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s <a href="https://community.notepad-plus-plus.org/post/62799">generic “change matching data between a given starting and ending sequence”</a>, but standalone rather than a part of a thread.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20942/developing-generic-regex-sequences</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 02:00:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20942.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Mar 2021 20:46:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Developing generic regex sequences on Sat, 04 Jun 2022 20:30:40 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> ,<br />
It actually let’s you use different regex flavors, (PCRE pre 7.3 and 7.3 plus, ECMAScript, Python, Golang, Java8, and .NET(C#), but the benefit of <a href="http://regex101.com" rel="nofollow ugc">regex101.com</a>, is that you can <strong>interactively</strong> see how your regex construction is going to work on the text you supply, either just Search or both Search and Replace. It’s actually educational to see what happens as you experiment with different regex constructions. You have to construct and then execute NPP to see results, and you’re not sure what you did wrong unless there’s a mode in NPP that does the same interactive result. I use it all the time to construct the regex I’ve been building, to be able to quickly see how the regex I’m constructing works on their supplied text.  It’s just another tool, and it is recommended as Peter points out in the FAQ, which is where I learned about it. So I can see why someone might want to use that tool, Alan. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77312</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77312</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Sat, 04 Jun 2022 20:30:40 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Sat, 04 Jun 2022 19:28:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c-bacca" aria-label="Profile: c-bacca">@<bdi>c-bacca</bdi></a> said in <a href="/post/77306">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">There are some good regex tester sites out there. Here’s one and a search for others. It really helps in debugging regular expressions. Generally you add in test data and the regex, and the site will highlight the strings it matches.<br />
Build and test regular expressions regex. Make a free account here to save your regexes. <a href="https://regex101.com/" rel="nofollow ugc">https://regex101.com/</a></p>
</blockquote>
<p dir="auto">I suppose, but I don’t believe it uses the same regular expression engine as Notepad++, so it is of limited usefulness if you are going to use Notepad++ to do your regular expression searches and replacements.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77311</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77311</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 04 Jun 2022 19:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Sat, 04 Jun 2022 14:21:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c-bacca" aria-label="Profile: c-bacca">@<bdi>c-bacca</bdi></a> said in <a href="/post/77306">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">I’m wondering if this needs to be added to the Regex FAQ or another thread.</p>
</blockquote>
<p dir="auto">Why would it need to be added where it already exists?</p>
<p dir="auto">Or were you not aware that we have two different regex FAQ entries?</p>
<p dir="auto">The second was the one discussed in this original topic: a table of contents of “generic” regex at <a href="https://community.notepad-plus-plus.org/topic/22673/faq-desk-generic-regular-expression-regex-formulas">https://community.notepad-plus-plus.org/topic/22673/faq-desk-generic-regular-expression-regex-formulas</a></p>
<p dir="auto">But the much earlier regex FAQ explains where to get regex help, including links to the Notepad++ regex documentation, plus links to a lot more “regex tester” sites than you mentioned: <a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77308</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77308</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 04 Jun 2022 14:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Sat, 04 Jun 2022 13:52:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c-bacca" aria-label="Profile: c-bacca">@<bdi>c-bacca</bdi></a> Ok this search is case sensitive.</p>
<p dir="auto">Also, here’s an example with example data. <a href="https://regex101.com/r/Hfly86/1" rel="nofollow ugc">https://regex101.com/r/Hfly86/1</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77307</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77307</guid><dc:creator><![CDATA[C Bacca]]></dc:creator><pubDate>Sat, 04 Jun 2022 13:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Sat, 04 Jun 2022 13:44:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I’m wondering if this needs to be added to the Regex FAQ or another thread. <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<p dir="auto">There are some good regex tester sites out there. Here’s one and a search for others. It really helps in debugging regular expressions. Generally you add in test data and the regex, and the site will highlight the strings it matches.</p>
<p dir="auto">Build and test regular expressions regex. Make a free account here to save your regexes. <a href="https://regex101.com/" rel="nofollow ugc">https://regex101.com/</a><br />
Search for more: <a href="https://search.brave.com/search?q=free+account+test+regular+expression&amp;source=web" rel="nofollow ugc">https://search.brave.com/search?q=free+account+test+regular+expression&amp;source=web</a></p>
<p dir="auto">I hope this is helpful!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77306</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77306</guid><dc:creator><![CDATA[C Bacca]]></dc:creator><pubDate>Sat, 04 Jun 2022 13:44:58 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 04 Mar 2022 14:32:09 GMT]]></title><description><![CDATA[<p dir="auto">A year later, I finally got around to making the “table of contents” post in the FAQ: “<a href="https://community.notepad-plus-plus.org/topic/22673/faq-desk-generic-regular-expression-regex-formulas">FAQ Desk: Generic Regular Expresion (regex) Formulas</a>”</p>
<p dir="auto">For now, it’s linking to the in-thread versions of these generic expressions… but I highly encourage the developers of the expression to spin off a new blog post for each generic regex.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74901</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74901</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 04 Mar 2022 14:32:09 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Mon, 04 Oct 2021 15:25:37 GMT]]></title><description><![CDATA[<p dir="auto">So a note on “practicality” here…<br />
Recently I had cause to implement some “OR” searches as described above.<br />
I pulled up this thread for the “formula”, put my specific use-case data in, and pressed <em>Find All in Current Document</em>, and, well, …, waited, a loooong time for results to come back.<br />
It turns out that the regexes specified above are fine for “small” data, but are rather inefficient for “bigger” data, or at least the size/type of data I had.</p>
<p dir="auto">Here’s an example:<br />
The original “match entire line OR regex” above is <code>(?-s)(?:(?=.*Bob|.*Ted))^.*(?:\R|\z)</code><br />
For my data, that one took between one and two minutes to run.<br />
If I change the regex to <code>(?-s)^(?=.*?(?:Bob|Ted)).+</code>, that one runs so quickly that it is hard to time, except to say maybe it takes a second or so.</p>
<p dir="auto">Probably all of the regexes I presented in my table above could be better optimized.  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70249</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70249</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 04 Oct 2021 15:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 20:39:38 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/67189">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">My conclusion is that pointing novices at regular expressions here and expecting them to solve their own related problems may not be super-successful.</p>
</blockquote>
<p dir="auto">That’s why I posted here, rather than separately. This thread is for “developing” the generic expressions, with lots of back and forth.  The “final version” will be published to its own separate thread.  (I probably shouldn’t’ve posted a link back to here from the inspiration thread, because this one wasn’t ready yet)</p>
<p dir="auto">I think your table is a good practical example of how to use it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67190</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67190</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 18 Jun 2021 20:39:38 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 20:36:12 GMT]]></title><description><![CDATA[<p dir="auto">So as I often do, I dug in a bit deeper to what Peter presented.<br />
My conclusion is that pointing novices at regular expressions here and expecting them to solve their own related problems may not be super-successful.<br />
It isn’t that all the needed info isn’t here – it is – it just may require some base knowledge to be applicable, without readers saying “Huh?”.</p>
<p dir="auto">So maybe some really concrete examples help.  In that light, my contribution will be how to match entire lines meeting the logic criteria that Peter brought to the table.</p>
<p dir="auto">Say you want to match some particular combination of <code>Bob</code> and <code>Ted</code> on a line – here’s information on doing that:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Logic</th>
<th>Expression to use</th>
<th>Match entire line when…</th>
</tr>
</thead>
<tbody>
<tr>
<td>OR</td>
<td><code>(?-s)(?:(?=.*Bob|.*Ted))^.*(?:\R|\z)</code></td>
<td><code>Bob</code> or <code>Ted</code> (or both) is present, in either order</td>
</tr>
<tr>
<td>AND</td>
<td><code>(?-s)(?:(?=.*Bob)(?=.*Ted))^.*(?:\R|\z)</code></td>
<td>both <code>Bob</code> and <code>Ted</code> are present, in either order</td>
</tr>
<tr>
<td>XOR</td>
<td><code>(?-s)(?:(?=.*Bob)(?!.*Ted)|(?!.*Bob)(?=.*Ted))^.*(?:\R|\z)</code></td>
<td><code>Bob</code> or <code>Ted</code> is present, but not when both are present</td>
</tr>
<tr>
<td>NOR-1</td>
<td><code>(?-s)(?:(?!.*Bob)(?!.*Ted))^.*(?:\R|\z)</code></td>
<td>neither <code>Bob</code>/<code>Ted</code> are present (form 1)</td>
</tr>
<tr>
<td>NOR-2</td>
<td><code>(?-s)(?:(?!.*(Bob|Ted)))^.*(?:\R|\z)</code></td>
<td>neither <code>Bob</code>/<code>Ted</code> are present (form 2)</td>
</tr>
<tr>
<td>NAND</td>
<td><code>(?-s)(?:(?!(?=.*Bob)(?=.*Ted)))^.*(?:\R|\z)</code></td>
<td>neither are present or one is present, but not when both are present</td>
</tr>
</tbody>
</table>
<p dir="auto">I took a little liberty with Peter’s original “notes” table column; changed it up a bit.  Also, obviously I only did a “two term” example.</p>
<p dir="auto">Maybe I’m off-base and this doesn’t provide additional insight on exactly how to use Peter’s info, but hopefully it does.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67189</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67189</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 18 Jun 2021 20:36:12 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 18:02:33 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/67179">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">Updating with n-term rather than just two-term:</p>
</blockquote>
<p dir="auto">Nice use of a table in a posting here, as well. :-)<br />
Seriously, valuable information here.  Kudos.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67185</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67185</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 18 Jun 2021 18:02:33 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 16:48: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> said in <a href="/post/67181">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">Now, Peter, I think it would be worth, in the general case, to add a ^ anchor, right in front of all these formulas !</p>
</blockquote>
<p dir="auto">The logic itself is independent of what you anchor it in.  My two usage examples in my <a href="/post/67136">first post about “Logic Gates for Regular Expressions”</a> show that you can use these standalone generic anchored either per-line or per-file depending on what you wrap around them.  With generic, you could even stick these <em>after</em> some other match on the line, saying “after some prefix, match aaa or bbb” or similar.  Hence, I didn’t want to specify the anchors in my generic expressions.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67182</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67182</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 18 Jun 2021 16:48:35 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 16:39:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I gave a <strong>similar</strong> answer to @vijay-s ( refer <a href="https://community.notepad-plus-plus.org/post/67178z">here</a> ), but <strong>Peter</strong> <em>BRILLIANTLY</em> beat me at it and gives us a <strong>complete</strong> panel of the look-aheads to use in order to <strong>simulate</strong> the main <strong>logical</strong> combinations !</p>
<hr />
<p dir="auto">Now, <strong>Peter</strong>, I think it would be worth, in the <strong>general</strong> case, to <strong>add</strong> a <strong><code>^</code></strong> <strong>anchor</strong>, right in <strong>front</strong> of <strong>all</strong> these formulas !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67181</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67181</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 18 Jun 2021 16:39:16 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 18 Jun 2021 16:24:43 GMT]]></title><description><![CDATA[<p dir="auto">Updating with n-term rather than just two-term:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>logic</th>
<th>two-term expression</th>
<th>n-term expression</th>
<th>notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>OR</td>
<td><code>(?=.*aaa|.*bbb)</code></td>
<td><code>(?=.*aaa|.*bbb|...|.*nnn)</code></td>
<td>must match at least one</td>
</tr>
<tr>
<td>AND</td>
<td><code>(?=.*aaa)(?=.*bbb)</code></td>
<td><code>(?=.*aaa)(?=.*bbb)...(?=.*nnn)</code></td>
<td>must match all</td>
</tr>
<tr>
<td>XOR</td>
<td><code>(?=.*aaa)(?!.*bbb)|(?!.*aaa)(?=.*bbb)</code></td>
<td>too complicated</td>
<td>match one or the other, but not both</td>
</tr>
<tr>
<td>NOR</td>
<td><code>(?!.*aaa)(?!.*bbb)</code></td>
<td><code>(?!.*aaa)(?!.*bbb)...(?!.*nnn)</code></td>
<td>matches neither one nor the other</td>
</tr>
<tr>
<td>NOR</td>
<td><code>(?!.*(aaa|bbb))</code></td>
<td><code>(?!.*(aaa|bbb|...|nnn))</code></td>
<td>second syntax for the same concept</td>
</tr>
<tr>
<td>NAND</td>
<td><code>(?!(?=.*aaa)(?=.*bbb))</code></td>
<td><code>(?!(?=.*aaa)(?=.*bbb)...(?=.*nnn))</code></td>
<td>may match zero or one of the terms, but not both</td>
</tr>
</tbody>
</table>
]]></description><link>https://community.notepad-plus-plus.org/post/67179</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67179</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 18 Jun 2021 16:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Thu, 17 Jun 2021 19:43:57 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/67139">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">I’m disturbed that some of your aaa in the first code block appears in italics – how does this happen in a code block?</p>
</blockquote>
<p dir="auto">It appears NodeBB isn’t treating all code blocks the same.  But while it was italicizing, it fortunately wasn’t taking any characters away, so those were the expressions I meant to convey.</p>
<p dir="auto">Giving the explicit txt filetype for the block:</p>
<pre><code class="language-txt">OR      (?=.*aaa|.*bbb)
AND     (?=.*aaa)(?=.*bbb)
XOR     (?=.*aaa)(?!.*bbb)|(?!.*aaa)(?=.*bbb)
NOR     (?!.*aaa)(?!.*bbb)
NOR     (?!.*(aaa|bbb))
NAND    (?!(?=.*aaa)(?=.*bbb))
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/67140</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67140</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Jun 2021 19:43:57 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Thu, 17 Jun 2021 19:38:59 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></p>
<p dir="auto">Hmm, I’m disturbed that some of your <code>aaa</code> in the first code block appears in italics – how does this happen in a code block?</p>
<p dir="auto">Usually we see it if someone tries to do regular expressions without a code block, then the <code>*</code> turn some parts of the text into italics.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67139</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67139</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 17 Jun 2021 19:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Thu, 17 Jun 2021 18:52:16 GMT]]></title><description><![CDATA[<p dir="auto">I had been thinking about this one for a while; I thought I had mentioned at least the OR vs AND in another recent discussion, but “OR” and “AND” are hard words to search for, so I couldn’t find it. ;-)</p>
<p dir="auto"><a href="/topic/21347">This recent discussion</a> gave me the impetus to flesh it out into a generic table.</p>
<h2>Logic Gates for Regular Expressions</h2>
<pre><code>OR      (?=.*aaa|.*bbb)
AND     (?=.*aaa)(?=.*bbb)
XOR     (?=.*aaa)(?!.*bbb)|(?!.*aaa)(?=.*bbb)
NOR     (?!.*aaa)(?!.*bbb)
NOR     (?!.*(aaa|bbb))
NAND    (?!(?=.*aaa)(?=.*bbb))
</code></pre>
<p dir="auto">Depending on <code>. matches newline</code> setting, these expressions either mean “this line” matches or “this file” matches</p>
<p dir="auto">For example, if you wrap each of those inside <code>(?-s)(×××)^.*$</code> (ie, use the expression above instead of ×××), it will select each of the lines marked T (TRUE), depending on which expression you use</p>
<pre><code>text          | OR | AND | XOR | NOR | NOR | NAND
--------------|----+-----+-----+-----+-----+------
aaa other aaa | T  |     | T   |     |     | T
aaa other bbb | T  | T   |     |     |     |
aaa other ccc | T  |     | T   |     |     | T
bbb other aaa | T  | T   |     |     |     | 
bbb other bbb | T  |     | T   |     |     | T
bbb other ccc | T  |     | T   |     |     | T
ccc other aaa | T  |     | T   |     |     | T
ccc other bbb | T  |     | T   |     |     | T
ccc other ccc |    |     |     | T   | T   | T
</code></pre>
<p dir="auto">Similarly, wrapped as <code>(?s)\A^(×××).</code> it will select/match the first character of every file that matches the logic expression</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67136</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67136</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Jun 2021 18:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 26 Mar 2021 17:35:34 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/64368">Developing generic regex sequences</a>:</p>
<blockquote>
<ul>
<li>FIND = <code>(?i-s)\A(^(?!</code><strong>DNM</strong><code>).*$\R*)+\z</code></li>
</ul>
</blockquote>
<p dir="auto">Per <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s improvement <a href="/post/64398">in the other thread</a>, the <code>$</code> shouldn’t really be outside of the <strong>DNM</strong>, so let’s just rework the generic to</p>
<ul>
<li>FIND = <code>(?i-s)\A(^(?!</code><strong>DNM</strong><code>).*\R?)+\z</code></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/64402</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/64402</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 26 Mar 2021 17:35:34 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Fri, 26 Mar 2021 11:15:06 GMT]]></title><description><![CDATA[<p dir="auto">Yes, I agree that a blog that is a kind of index for the other, own blogs, is the most suitable for this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/64385</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/64385</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 26 Mar 2021 11:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Thu, 25 Mar 2021 20:55:22 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/64367">Developing generic regex sequences</a>:</p>
<blockquote>
<p dir="auto">can be spun off into its own blog post</p>
</blockquote>
<p dir="auto">or FAQ Desk entry, or post in a FAQ desk entry… however we end up wanting to structure the “publish the generic regex sequence” entries.</p>
<p dir="auto">My thoughts on that:</p>
<ul>
<li>I don’t want <em>yet another</em> category in the forum.  Either Blogs or FAQ Desk should be sufficient</li>
<li>If it’s in Blogs, I would lobby for each generic sequence to get its own Topic</li>
<li>If it’s in FAQ Desk,
<ul>
<li>I could accept a single Topic with multiple Replies, one reply per description.  But that would quickly get overwhelming, I think.</li>
<li>But even better, I think is a single Topic with a link to each of the individual blogs; after someone posts a generic expression Blog, then Guy or another moderator could edit the FAQ Desk entry to point to the new Blog entry</li>
</ul>
</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/64369</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/64369</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 25 Mar 2021 20:55:22 GMT</pubDate></item><item><title><![CDATA[Reply to Developing generic regex sequences on Thu, 25 Mar 2021 20:51:13 GMT]]></title><description><![CDATA[<p dir="auto">As my first, derived from <a href="/post/64365">this recent post</a></p>
<h2>Find a file that never contains a line that matches a specific expression</h2>
<ul>
<li>FIND = <code>(?i-s)\A(^(?!</code><strong>DNM</strong><code>).*$\R*)+\z</code></li>
<li><strong>DNM</strong> means “does not match”, and is any regular expression which should not be found as a complete line anywhere in the file</li>
</ul>
<p dir="auto">As far as I could tell (in that other thread), this would work to look for a whole line that matches <strong>DNM</strong> and then fail the search because of it.</p>
<p dir="auto">For my small tests, this formula worked.  But I am sure there are gotchas I’ve missed.</p>
<p dir="auto">For example, I haven’t tried, but I bet that larger files will not work, because of how much memory gets gobbled by this expression. Is there a way to improve this so that it becomes large-file agnostic?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/64368</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/64368</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 25 Mar 2021 20:51:13 GMT</pubDate></item></channel></rss>