<?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 to find any lines that do NOT have a specific number of a character]]></title><description><![CDATA[<p dir="auto">I’m working with larger pipe-delimited csvs (110k plus lines) and need to be able to find any lines in the file that do not have a specific number of pipes - one file should have 9 pipes (10 columns) and another file should have 16 pipes (17 columns).</p>
<p dir="auto">How do I do that?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18229/regex-to-find-any-lines-that-do-not-have-a-specific-number-of-a-character</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 16:52:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18229.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Sep 2019 12:19:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Sat, 19 Oct 2019 13:10:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@mark-yorkovich</a>, and <strong>All</strong>,</p>
<p dir="auto">See my <strong>very late</strong> regex solution , below :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/47905">https://community.notepad-plus-plus.org/post/47905</a></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47913</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47913</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 19 Oct 2019 13:10:53 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 19:13:44 GMT]]></title><description><![CDATA[<p dir="auto">ah…</p>
<p dir="auto">understand now, thank you so much</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47112</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47112</guid><dc:creator><![CDATA[Allen Bai]]></dc:creator><pubDate>Fri, 13 Sep 2019 19:13:44 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 18:53:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16403">@Allen-Bai</a> said:</p>
<blockquote>
<p dir="auto">in fact, I mean<br />
（。＊＼｜）｛９｝。＊</p>
</blockquote>
<p dir="auto">Then why not put it in tick marks? Both the <a href="https://daringfireball.net/projects/markdown/syntax" rel="nofollow ugc">help I linked to</a> and the <a href="https://notepad-plus-plus.org/community/topic/14262/how-to-markdown-code-on-this-forum/4" rel="nofollow ugc">“how to use markdown code” post</a> explained how to do that, as did my boilerplate text itself.</p>
<ul>
<li><code>`(.*\|){9}.*`</code></li>
</ul>
<p dir="auto">renders as</p>
<ul>
<li><code>(.*\|){9}.*</code></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/47110</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47110</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 13 Sep 2019 18:53:40 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 15:51:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16403">@Allen-Bai</a> said:</p>
<blockquote>
<p dir="auto">(.<em>|){9}.</em></p>
<p dir="auto">how about this?</p>
</blockquote>
<p dir="auto">in fact, I mean<br />
（。＊＼｜）｛９｝。＊</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47102</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47102</guid><dc:creator><![CDATA[Allen Bai]]></dc:creator><pubDate>Fri, 13 Sep 2019 15:51:39 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 14:28:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16403">@Allen-Bai</a> said:</p>
<blockquote>
<p dir="auto">it can’t show correctly,</p>
</blockquote>
<p dir="auto">To quote my boilerplate:</p>
<blockquote>
<p dir="auto">This forum is formatted using <a href="https://daringfireball.net/projects/markdown/syntax" rel="nofollow ugc">Markdown</a>, with a help link buried on the little grey <code>?</code> in the COMPOSE window/pane when writing your post.  For more about how to use Markdown in this forum, please see <a href="https://notepad-plus-plus.org/community/topic/14262/how-to-markdown-code-on-this-forum/4" rel="nofollow ugc">@Scott-Sumner’s post in the “how to markdown code on this forum” topic</a>, and my updates <a href="https://notepad-plus-plus.org/community/topic/14262/how-to-markdown-code-on-this-forum/9" rel="nofollow ugc">near the end</a>.  It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes (<code>""</code>) to curly “smart” quotes (<code>“”</code>), will change hyphens to dashes, will sometimes hide asterisks (or if your text is <code>c:\folder\*.txt</code>, it will show up as <code>c:\folder*.txt</code>, missing the backslash).</p>
</blockquote>
<p dir="auto">For images: upload image to imgur. embed images with the syntax <code>![](http://i.imgur.com/QTHZysa.png)</code>. (please use imgur’s “direct link” with <a href="http://i.imgur.com" rel="nofollow ugc">i.imgur.com</a> as the hostname and the appropriate .png or .gif extension, rather than the “image” link, which really links to the HTML-wrapper, and will not embed in the forum)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47097</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47097</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 13 Sep 2019 14:28:59 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 14:22:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16403">@Allen-Bai</a></p>
<p dir="auto">I assume you meant <code>(.\|){9}.</code><br />
This matches 9 and more pipe delimited lines.</p>
</blockquote>
<p dir="auto">in fact, I mean…</p>
<p dir="auto">（。＼｜）｛９｝。＊</p>
<p dir="auto">but it can’t show correctly, and I don’t know how to put screenshot</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47096</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47096</guid><dc:creator><![CDATA[Allen Bai]]></dc:creator><pubDate>Fri, 13 Sep 2019 14:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Fri, 13 Sep 2019 10:43:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16403">@Allen-Bai</a></p>
<p dir="auto">I assume you meant <code>(.\|){9}.</code><br />
This matches 9 and more pipe delimited lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47084</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47084</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 13 Sep 2019 10:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Thu, 12 Sep 2019 23:19:19 GMT]]></title><description><![CDATA[<p dir="auto">(.<em>|){9}.</em></p>
<p dir="auto">how about this?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47066</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47066</guid><dc:creator><![CDATA[Allen Bai]]></dc:creator><pubDate>Thu, 12 Sep 2019 23:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 17:50:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a> said:</p>
<blockquote>
<p dir="auto">…finding all of the new line/line feed characters - only in those now-bookmarked lines - and replace them with some other character (spaces, dummy chars, whatever) to get each of those records to be on one line</p>
</blockquote>
<p dir="auto">Didn’t we do all this <a href="https://notepad-plus-plus.org/community/topic/18208/reg-ex-to-find-lines-with-linefeeds-in-csv" rel="nofollow ugc">the other day</a>?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47023</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47023</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Sep 2019 17:50:22 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 17:48:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a> said:</p>
<blockquote>
<p dir="auto">Alan’s exp doesn’t match anything in my file</p>
</blockquote>
<p dir="auto">Well, if I copy and paste your “lorem ipsum” data (above) into a new tab and then run my regex (above) on it, I get lines with exactly 9 pipes redmarked, which I thought was the goal (or the inverse of the goal):</p>
<p dir="auto"><img src="https://camo.nodebb.org/69dd7ed8d39fa8046d6151da6ed42f6ed4f0a1d3?url=https%3A%2F%2Fi.imgur.com%2FuMQBrYy.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<p dir="auto">So…I really don’t know where the disconnect is…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47022</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47022</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Sep 2019 17:48:16 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 17:45:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a><br />
because it was assumed that all columns contain data</p>
</blockquote>
<p dir="auto">My bad. I didn’t give you all of the details of what I’m working with.</p>
<blockquote>
<p dir="auto">find: <code>^(?&gt;.*?\|){9}(?!.*?\|)</code> does not make that assumption.</p>
</blockquote>
<p dir="auto">This works.</p>
<p dir="auto">So at this point what I’d need to do, ideally, is to do a Find/Replace, finding all of the new line/line feed characters - <strong>only in those now-bookmarked lines</strong> - and replace them with some other character (spaces, dummy chars, whatever) to get each of those records to be on one line. Can I do a find/replace on just the bookmarked lines? Or perhaps, instead of the multi-step approach, is there a way to do this on the Replace tab, entering a regex in the Find what box that finds those lines and just replace the new line characters with dummy characters in one step?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47021</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47021</guid><dc:creator><![CDATA[Mark Yorkovich]]></dc:creator><pubDate>Wed, 11 Sep 2019 17:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 17:27:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a></p>
<p dir="auto">because it was assumed that all columns contain data</p>
<p dir="auto">find: <code>^(?&gt;.*?\|){9}(?!.*?\|)</code> does not make that assumption.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47018</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47018</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Sep 2019 17:27:20 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 17:24:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7192">@dinkumoil</a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a></p>
<p dir="auto">I generated with the test data of <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> a file of 146545 lines and did that what I’ve suggested above - I got the expected result.</p>
<p dir="auto">Be sure that the pipe character in your file is really a pipe character (code 124). There is another one (code 166 in Windows-1252 character encoding) which looks nearly identical:</p>
<p dir="auto">Pipe character: <code>|</code><br />
The other one: <code>¦</code></p>
</blockquote>
<p dir="auto">Yup - they’re pipes.</p>
<p dir="auto">Here is a good sample of what I’m working with. Lines 1, 9, 10, 11, 16 thru 20 and 36, 37 are single-line records with 9 pipes and 10 columns. Lines 2 thru 8 are one record and together have 9 pipes/10 cols. Similarly, lines 12 through 15 are a single record, and lines 21 thru 35 are a single record.</p>
<p dir="auto">LOREM120|8        |3     |1          |1     |0     |0     |||INST020<br />
LOREM120|9        |1     |1          |0     |0     |0     ||Lorem Ipsum Dolor]<br />
LOREM: BS/BP</p>
<p dir="auto">LOREM IPSUM:<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.|<br />
IPSUM16|1        |1     |1          |1     |0     |0     |||3001479<br />
IPSUM16|1        |2     |1          |1     |0     |0     |||3003077<br />
IPSUM16|11       |0     |1          |0     |0     |0     |||<br />
IPSUM16|13       |0     |1          |0     |0     |0     ||Lorem ipsum dolor sit amet<br />
consectetur adipiscing elit,<br />
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>DOLOR53</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>2</td>
<td>0</td>
<td colspan="3">0</td>
<td>3003084</td>
</tr>
<tr>
<td>DOLOR53</td>
<td>2</td>
<td>3</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td colspan="3">0</td>
<td>Lorem ipsum</td>
</tr>
<tr>
<td>DOLOR53</td>
<td>2</td>
<td>4</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td colspan="3">0</td>
<td>Lorem ipsum</td>
</tr>
<tr>
<td>LOREM56</td>
<td>8</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td colspan="3">0</td>
<td>Lorem ipsum</td>
</tr>
<tr>
<td>LOREM56</td>
<td>8</td>
<td>2</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td colspan="3">0</td>
<td>Lorem ipsum</td>
</tr>
<tr>
<td>LOREM56</td>
<td>9</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td colspan="2">0</td>
<td>Lorem ipsum dolor sit amet</td>
</tr>
</tbody>
</table>
<p dir="auto">consectetur adipiscing elit</p>
<p dir="auto">consectetur adipiscing elit<br />
consectetur adipiscing elit</p>
<p dir="auto">consectetur adipiscing elit<br />
Lorem ipsum dolor sit amet<br />
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p dir="auto">Lorem ipsum dolor sit amet<br />
consectetur adipiscing elit<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.|<br />
DOLOR19|1        |2     |1          |1     |0     |0     |||3003124<br />
LOREM01|1        |1     |1          |1     |1     |0     |||3003024</p>
<p dir="auto">Your suggested regex ^(?&gt;.+?|){9}(?!.+?|) isn’t finding any matches on that</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47017</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47017</guid><dc:creator><![CDATA[Mark Yorkovich]]></dc:creator><pubDate>Wed, 11 Sep 2019 17:24:04 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 16:54:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a></p>
<p dir="auto">I generated with the test data of <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> a file of 146545 lines and did that what I’ve suggested above - I got the expected result.</p>
<p dir="auto">Be sure that the pipe character in your file is really a pipe character (code 124). There is another one (code 166 in Windows-1252 character encoding) which looks nearly identical:</p>
<p dir="auto">Pipe character: <code>|</code><br />
The other one: <code>¦</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/47015</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47015</guid><dc:creator><![CDATA[dinkumoil]]></dc:creator><pubDate>Wed, 11 Sep 2019 16:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 16:36:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a><br />
Yup, sure is. - No matches - double-checked my settings.</p>
<p dir="auto">To reiterate: My file is mostly 9 pipes/10 cols per line, but some have less and a few more than that and I need to find those.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47012</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47012</guid><dc:creator><![CDATA[Mark Yorkovich]]></dc:creator><pubDate>Wed, 11 Sep 2019 16:36:34 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 16:20:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a></p>
<p dir="auto">make sure your caret is on the first line if you have not checked <strong>wrap around</strong></p>
<p dir="auto"><img src="https://camo.nodebb.org/344dde54f93424b959fc68e837e088850a746766?url=https%3A%2F%2Fi.imgur.com%2FsSKVIVn.png" alt="" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/47010</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47010</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Sep 2019 16:20:30 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 16:11:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7192">@dinkumoil</a><br />
I followed your instructions, but I’m not getting any matches.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47007</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47007</guid><dc:creator><![CDATA[Mark Yorkovich]]></dc:creator><pubDate>Wed, 11 Sep 2019 16:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:50:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> said:</p>
<blockquote>
<p dir="auto">ok, I hope I finally understood this sentence</p>
</blockquote>
<p dir="auto">I got the following hint at <a href="https://regex101.com/" rel="nofollow ugc">https://regex101.com/</a> when trying your regex:</p>
<blockquote>
<p dir="auto">A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you’re not interested in the data.</p>
</blockquote>
<p dir="auto">Then I read <a href="https://www.regular-expressions.info/atomic.html" rel="nofollow ugc">https://www.regular-expressions.info/atomic.html</a></p>
<p dir="auto">Together it made me to give the non-capturing group a try.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47003</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47003</guid><dc:creator><![CDATA[dinkumoil]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:50:41 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:38:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7192">@dinkumoil</a></p>
<p dir="auto">ok, I hope I finally understood this sentence</p>
<p dir="auto"><em>Match pattern independently of surrounding patterns, and don’t backtrack into it. Failure to match will cause the whole subject not to match.</em></p>
<p dir="auto">which then means that my first attempt, which I was questioning, did backtrack.<br />
which makes your regex is the one which I, and hopefully <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a> were looking for.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a>,<br />
Alan, ja, I guess you are right.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a>, so does this work on your data and the procedure described by<br />
<a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7192">@dinkumoil</a> ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47001</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47001</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:38:21 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:30:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a></p>
<p dir="auto">Was removing the escaping of the <code>|</code> inside the <code>[</code> and <code>]</code> intentional?  Yes, I suppose, since it has no special meaning there and doesn’t need escaping.</p>
<blockquote>
<p dir="auto">don’t understand why there is a need to make sure that a line does not start with a pipe</p>
</blockquote>
<p dir="auto">I think that with this type of data, fields could be empty, thus if the first field is empty a line would start with a pipe?  But, is the regex really saying what I think you implied?  I’m saying “not pipe” not just at the start of a line, but for in between fields as well.  And I’m only doing it this way because your original attempt using a <code>.</code> expression fails (for some odd and as yet unknown reason).  I think I’m getting confused.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47000</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47000</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:30:05 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:29:37 GMT]]></title><description><![CDATA[<p dir="auto">Eko’s exp works for me to find rows with 9 pipes/10 cols. Alan’s exp doesn’t match anything in my file with mostly 9 pipes/10 cols with a few known rows with less than 9 pipes.</p>
<p dir="auto">I’m trying to match on rows with greater than or less  than 9 pipes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46999</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46999</guid><dc:creator><![CDATA[Mark Yorkovich]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:29:37 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:27:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a></p>
<p dir="auto">The following regex does the job: <code>^(?&gt;.+?\|){9}(?!.+?\|)</code>. I’m not sure why but it seems to be related to the lack of backtracking due to <code>?&gt;</code> which turns group one to a non-capturing group.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16339">@Mark-Yorkovich</a></p>
<p dir="auto">In the <em>Search &amp; Replace</em> dialog go to the <code>Mark</code> register:</p>
<p dir="auto">Find what: <code>^(?&gt;.+?\|){9}(?!.+?\|)</code><br />
Bookmark line: ticked<br />
Purge for each search: ticked<br />
Wrap around: ticked<br />
Regular expression: ticked</p>
<p dir="auto">Click <code>Mark All</code>. Go to <code>(menu) Search -&gt; Bookmark -&gt; Inverse Bookmark</code>. Now all lines which do <strong>not</strong> contain exactly 9 pipe characters are bookmarked.</p>
<p dir="auto">You can navigate to these lines with <code>F2</code> (next bookmark) and <code>SHIFT+F2</code> (previous bookmark).</p>
<p dir="auto">You can also remove these lines by clicking <code>(menu) Search -&gt; Bookmark -&gt; Remove bookmarked lines</code>.</p>
<p dir="auto">You can also do the opposite (removing <strong>not</strong> bookmarked lines) by clicking <code>(menu) Search -&gt; Bookmark -&gt; Remove unmarked lines</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46998</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46998</guid><dc:creator><![CDATA[dinkumoil]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:27:49 GMT</pubDate></item><item><title><![CDATA[Reply to Regex to find any lines that do NOT have a specific number of a character on Wed, 11 Sep 2019 15:22:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a></p>
<p dir="auto">Alan, was this intentional?<br />
<code>(?-s)^([^|\r\n]*?\|){9}(?!(?:.*?\|))</code><br />
or should it be<br />
<code>(?-s)^([^\|\r\n]*?\|){9}(?!(?:.*?\|))</code><br />
(which by the way doesn’t seem to have any impact if used or not)</p>
<p dir="auto">Now given your working example this works also<br />
<code>(?-s)^([^\|]*?\|){9}(?!.*?\|)</code></p>
<p dir="auto">But I don’t understand why there is a need to make sure that a line<br />
does not start with a pipe.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46997</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46997</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 11 Sep 2019 15:22:51 GMT</pubDate></item></channel></rss>