<?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[How to mark lines with under &quot;x&quot; characters after : in a line.]]></title><description><![CDATA[<p dir="auto">I am working on sorting a list of my login information.</p>
<p dir="auto">My website requires a password of 8 characters, so I want to remove the lines with 7 or less characters after the : divider between the email/password.</p>
<p dir="auto">I am just unsure of how to do this, help is appreciated. :)</p>
<p dir="auto">Example of lines I want to keep:</p>
<p dir="auto"><a href="mailto:mystictoffee11@yahoo.com" rel="nofollow ugc">mystictoffee11@yahoo.com</a>:smartguy<br />
<a href="mailto:maniactor2313@yahoo.com" rel="nofollow ugc">maniactor2313@yahoo.com</a>:maurermartin</p>
<p dir="auto">Examples of lines I want to delete:</p>
<p dir="auto"><a href="mailto:philipsedf3@yahoo.com" rel="nofollow ugc">philipsedf3@yahoo.com</a>:plakes9<br />
genciyev13@mail.ru:241241</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17433/how-to-mark-lines-with-under-x-characters-after-in-a-line</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 22:24:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17433.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Apr 2019 16:06:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sun, 15 Aug 2021 16:24:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/hoang-ngoc" aria-label="Profile: hoang-ngoc">@<bdi>hoang-ngoc</bdi></a>, <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">The following <strong>single</strong> search regex could be used and, with an empty <strong>replace</strong> field, would <strong>delete</strong> any line with a <strong>valid</strong> user-name :</p>
<p dir="auto">SEARCH <strong><code>(?i-s)(?=^[a-z0-9])(?=.*[a-z0-9]:)(?=.*[a-z].*:)^[a-z0-9_.-]{6,15}:.*\R?</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>(?i-s)</code></strong> forces an <strong>insensitive</strong> search process and the <strong>regex</strong> dot <strong><code>.</code></strong> standing for a <strong>single standard</strong> character</p>
</li>
<li>
<p dir="auto">Then the main part is <strong><code>^[a-z0-9_.-]{6,15}:.*\R?</code></strong> which searches for <strong><code>6</code></strong> to <strong><code>15</code></strong> chars, before a <strong>colon</strong> which can be, either, a standard <strong>letter</strong> or <strong>digit</strong>, an <strong>underscore</strong>, a <strong>period</strong> or a <strong>dash</strong>, followed by the remainder of <strong>current</strong> line and a possible <strong>line_break</strong></p>
</li>
<li>
<p dir="auto">This part will be <strong>valid</strong> <em>ONLY IF</em>, in addition, these <strong>three</strong>  lookaheads are <em>TRUE</em>, at <strong>beginning</strong> of current line :</p>
<ul>
<li>
<p dir="auto">A <strong>letter</strong> or <strong>digit</strong> begins the user-name ( part <strong><code>(?=^[a-z0-9])</code></strong> )</p>
</li>
<li>
<p dir="auto">A <strong>letter</strong> or <strong>digit</strong> ends the user-name ( part <strong><code>(?=.*[a-z0-9]:)</code></strong> )</p>
</li>
<li>
<p dir="auto">The user-name contains, at least, <em>ONE</em> <strong>letter</strong> ( part <strong><code>(?=.*[a-z].*:)</code></strong> )</p>
</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto">So, given this <em>INPUT</em> text :</p>
<pre><code class="language-diff">short:••••••••                      #  &lt; 6 chars
ThisIs2good:••••••••                #  OK
Looong_user-name:••••••••           #  &gt; 15 chars
us@er'NA=ME:••••••••                #  NON-VALID chars
ok-chr:••••••••                     #  OK  (  7 chars and ALL chars ALLOWED )
ABCD-FGHI_12.34:••••••••            #  OK  ( 15 chars and ALL chars ALLOWED )
1234-6789:••••••••                  #  NO letter
.User-Name:••••••••                 #  NON-VALID char at START
USER.NAME_:••••••••                 #  NON-VALID char at END
1ok_again2:••••••••                 #  OK
</code></pre>
<p dir="auto"><strong>After</strong> the replacment, it would remain :the following <strong>OUTPUT</strong> text :</p>
<pre><code class="language-diff">short:••••••••                      #  &lt; 6 chars
Looong_user-name:••••••••           #  &gt; 15 chars
us@er'NA=ME:••••••••                #  NON-VALID chars
1234-6789:••••••••                  #  NO letter
.User-Name:••••••••                 #  NON-VALID char at START
USER.NAME_:••••••••                 #  NON-VALID char at END
</code></pre>
<p dir="auto">Best regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68949</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68949</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 15 Aug 2021 16:24:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 14 Aug 2021 20:02:32 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">Thank you so much, i really appreciate what you are doing for this community, keep it up</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68887</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68887</guid><dc:creator><![CDATA[Hoang Ngoc]]></dc:creator><pubDate>Sat, 14 Aug 2021 20:02:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 14 Aug 2021 19:56:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hoang-ngoc" aria-label="Profile: Hoang-Ngoc">@<bdi>Hoang-Ngoc</bdi></a> said in <a href="/post/68883">How to mark lines with under "x" characters after : in a line.</a>:</p>
<blockquote>
<p dir="auto">What about before “:”, my website request “Username can only contain the allowed characters: uppercase letters, lowercase letters, numbers (a-z, A-Z, 0-9), underscores, dashes and periods. Username must begin or end with a letter or number and must contain at least one letter.” and “Account name must have 6-15 characters”</p>
</blockquote>
<p dir="auto">and then you deleted that and wrote</p>
<blockquote>
<p dir="auto">I wanna delete line not follow the rule</p>
</blockquote>
<p dir="auto">Well, that changes things.  Thanks for wasting my time while I was writing up deleting everything that <em>didn’t</em> follow that rule.  I’ll edit what I was in the middle of…</p>
<p dir="auto">-----</p>
<p dir="auto">The least you can do is ask complete questions and at least attempt to make your posts make sense (for example, the preview window should have showed you that it was rendering your new text as if it were part of my quoted message, before you deleted it)</p>
<p dir="auto">As I said earlier, this forum is <em>not</em>  a data transformation service.  So you’ll get one more freebie from me.  But you’ve got to try to put more effort in if you’re going to be asking people for help.  If you want to do many search-and-replace, you’re going to have to read <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">the official Notepad++ regular expression docs</a>, which I already linked for you before, and have now linked again.</p>
<p dir="auto">To allow uppercase, lowercase, numbers, underscores, dashes, periods, you can use the <code>[a-zA-Z0-9_.-]</code>  .  To indicate a specific quantity, you can use <code>{N,M}</code>, where <code>N</code> and <code>M</code> are the range you want to allow.  For the more restrictive letter-or-number only for the first and last charcter, use <code>[a-zA-Z0-9]</code> without the other characters.  Put that all together: since you want a restrictive followed by N-M less restrictive, followed by a restrictive, the N-M will need to be a range that is two less than the actually-allowed range, so 4-13.  Thus, <code>[a-zA-Z0-9][a-zA-Z0-9_.-]{4,13}[a-zA-Z0-9]</code>.  And, as before, you need a start-of-line anchor, and want to have the colon after.  <s>But this is what’s <em>allowed</em>, and you want to delete what’s not allowed.</s>  Since you now want to delete any that match the rules, that’s slightly easier.</p>
<p dir="auto">FIND = <code>(?-s)^[a-zA-Z0-9][a-zA-Z0-9_.-]{4,13}[a-zA-Z0-9]:.*(\R|\z)</code></p>
<p dir="auto">Actually, that almost did it.</p>
<pre><code>short:blah123
thisIs2good:blah123
toooverlylongouidiot:blah123
bad'character:blah123
ok-char:blah123
1234-6789:blah123
-badStart:blah123
badEnd_:blah123
1ok_again2:blah123
</code></pre>
<p dir="auto">becomes</p>
<pre><code>short:blah123
toooverlylongouidiot:blah123
bad'character:blah123
-badStart:blah123
badEnd_:blah123
</code></pre>
<p dir="auto">You’ll notice that username=<code>1234-6789</code> line was deleted, even though it didn’t contain at least one letter.  That’s because  getting the “at least one letter” is hard.  So I want to handle that separately.</p>
<p dir="auto"><em>Before</em> doing the regex shown above, do a FIND = <code>^[0-9_.-]{6,15}:.*$</code> and REPLACE=<code>!KEEPME!$0</code>, which will give an intermediate:</p>
<pre><code>short:blah123
thisIs2good:blah123
toooverlylongouidiot:blah123
bad'character:blah123
ok-char:blah123
!KEEPME!1234-6789:blah123
-badStart:blah123
badEnd_:blah123
1ok_again2:blah123
</code></pre>
<p dir="auto">Now do the one I showed earlier: <code>(?-s)^[a-zA-Z0-9][a-zA-Z0-9_.-]{4,13}[a-zA-Z0-9]:.*(\R|\z)</code> =&gt;</p>
<pre><code>short:blah123
toooverlylongouidiot:blah123
bad'character:blah123
!KEEPME!1234-6789:blah123
-badStart:blah123
badEnd_:blah123
</code></pre>
<p dir="auto">Now do FIND = <code>^!KEEPME!</code> and REPLACE = empty to get rid of that indicator.</p>
<pre><code>short:blah123
toooverlylongouidiot:blah123
bad'character:blah123
1234-6789:blah123
-badStart:blah123
badEnd_:blah123
</code></pre>
<p dir="auto">Now you only show the usernames that violate your rules.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68885</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68885</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 14 Aug 2021 19:56:21 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 14 Aug 2021 19:40:18 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">What about before “:”, my website request “Username can only contain the allowed characters: uppercase letters, lowercase letters, numbers (a-z, A-Z, 0-9), underscores, dashes and periods. Username must begin or end with a letter or number and must contain at least one letter.” and “Account name must have 6-15 characters”<br />
I wanna delete line not follow the rule</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68884</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68884</guid><dc:creator><![CDATA[Hoang Ngoc]]></dc:creator><pubDate>Sat, 14 Aug 2021 19:40:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 14 Aug 2021 19:10:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hoang-ngoc" aria-label="Profile: Hoang-Ngoc">@<bdi>Hoang-Ngoc</bdi></a></p>
<p dir="auto">With data:</p>
<pre><code>kkkkk:123456
kkkkk:aaaaaa
kkkkk:a123456
kkkk:123456a
kkkkk:zzzzz
</code></pre>
<p dir="auto">FIND = <code>(?-s)^.*:(&lsqb;&lsqb;:alpha:&rsqb;&rsqb;+|&lsqb;&lsqb;:digit:&rsqb;&rsqb;+)(\R|\z)</code><br />
REPLACE = empty<br />
SEARCH MODE = regular expression<br />
yields</p>
<pre><code>kkkkk:a123456
kkkk:123456a
</code></pre>
<p dir="auto">The logic I used: you wanted to delete the whole line, so I had to start with “from the start of the line, any character”; you said it came after a colon, so “followed by a colon”; then “followed by either a group of all letters or a group of all numbers”, then “followed by the end of the line (or end of the file)”.  I then translated those into regex tokens.</p>
<p dir="auto">-—</p>
<p dir="auto"><em><strong>Please note</strong>: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you.  If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future.  But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin.  The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.</em></p>
<p dir="auto">-—</p>
<p dir="auto"><em>Do you want regex search/replace help?  Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you.  All example text should be marked as literal text using the <code>&lt;/&gt;</code> toolbar button or manual <a href="https://community.notepad-plus-plus.org/topic/14262/how-to-markdown-code-on-this-forum/4">Markdown syntax</a>. To make <code>regex in red</code> (and so they keep their special characters like *), use backticks, like <code>`^.*?blah.*?\z`</code>. Screenshots can be pasted from the clipboard to your post using <code>Ctrl+V</code> to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have <strong>and</strong> the text you want to get from that data; include examples of things that <strong>should match</strong> and be transformed, <strong>and</strong> things that <strong>don’t match</strong> and should be left alone; show <strong>edge cases</strong> and make sure you examples are as <strong>varied</strong> as your real data.  Show the regex you already tried, <strong>and why</strong> you thought it should work; tell us what’s wrong with what you <strong>do</strong> get. Read the official <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">NPP Searching / Regex docs</a> and the forum’s <a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation">Regular Expression FAQ</a>. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/68882</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68882</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 14 Aug 2021 19:10:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 14 Aug 2021 18:54: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><br />
Hello sir<br />
I need help in notepad++, really appreciated<br />
List:<br />
kkkkk:123456<br />
kkkkk:aaaaaa<br />
kkkkk:a123456<br />
kkkk:123456a<br />
Examples of lines I want to delete:<br />
kkkkk:123456<br />
kkkkk:aaaaaa<br />
Delete all line after “:” have only numbers or letter</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68881</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68881</guid><dc:creator><![CDATA[Hoang Ngoc]]></dc:creator><pubDate>Sat, 14 Aug 2021 18:54:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Mon, 26 Aug 2019 16:29:43 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:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicholas-wetzel" aria-label="Profile: Nicholas-Wetzel">@<bdi>Nicholas-Wetzel</bdi></a>: Welcome to the Notepad++ Community.</p>
<blockquote>
<p dir="auto">Example of lines I want to keep:<br />
Example of lines I want to delete:</p>
</blockquote>
<p dir="auto">Thank you for clearly specifying both.  That helps us help you.</p>
<p dir="auto">Using the regex <code>^.*:.{1,7}(\R+|\z)</code> to find, with replace being empty, should delete those lines</p>
</blockquote>
<p dir="auto">Mind checking my new thread here please?</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/18149/sorting-login-information" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/18149/sorting-login-information</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/46595</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46595</guid><dc:creator><![CDATA[Nicholas Wetzel]]></dc:creator><pubDate>Mon, 26 Aug 2019 16:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Tue, 30 Apr 2019 00:06:40 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:</p>
<blockquote>
<p dir="auto">(?-s)^(?:ADDRESS(-.<em>?)</em>|EMAIL):.*?(?:\R|\Z)</p>
</blockquote>
<p dir="auto">(? -s) ^ (?: ADDRESS (-. *?) * | EMAIL):. *? (?: \ R | \ Z)<br />
This command worked perfectly on all files in a given folder. All lines started by ADDRESS and EMAIL were automatically deleted as desired.<br />
I am very pleased and grateful for this important help.<br />
Only three files did not have their email deleted, because the email line does not have the word EMAIL at the beginning of the line.<br />
P.S. I do not know if it would be possible in this command to include the search for any line that contains the @</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42718</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42718</guid><dc:creator><![CDATA[Francisco]]></dc:creator><pubDate>Tue, 30 Apr 2019 00:06:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Tue, 23 Apr 2019 13:20:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francisco" aria-label="Profile: Francisco">@<bdi>Francisco</bdi></a> said:</p>
<blockquote>
<p dir="auto">I have 100 text files, with the same format, each with several lines.<br />
6 of these lines, are present in all files and start like this:</p>
</blockquote>
<p dir="auto">The problem is, you’ve already rejected our solutions (or, at least, you keep on asking, so we have to assume your problem isn’t solved), but have shown nothing that indicates why what we’ve given doesn’t work for you.  One reason for this is explained in my boilerplate below (after the dashed line).</p>
<p dir="auto">That said, maybe you’re just unsure how to combine <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>’s fix to my regex, and then have it actually do the deletion, rather than just highlighting.  If that’s the case, then it’s simple.  I’ll also tweak my portion, because you have now indicated that it should also delete EMAIL, which wasn’t anywhere in your original problem statement.</p>
<ul>
<li>Find What: <code>(?-s)^(?:ADDRESS(-.*?)*|EMAIL):.*?(?:\R|\Z)</code>
<ul>
<li><code>(?-s)</code>: don’t have <code>.</code> match newline</li>
<li><code>^</code>: match starts at beginning of line</li>
<li><code>(?:...)</code>: make a group, but don’t give it a number</li>
<li><code>ADDRESS(-.*?)*</code>: match the word “ADDRESS”, possibly followed by one or more hyphens, possibly followed by other characters</li>
<li><code>|</code>: the OR operator – will match what is before or what is after</li>
<li><code>EMAIL</code>: the word EMAIL</li>
<li><code>:</code>: that group of ADDRESS or EMAIL must be immediately followed by a colon to match</li>
<li><code>.*?</code>: match the remaining characters on the line</li>
<li><code>(?:\R|\Z)</code>: another unnumbered group, this time containing a NEWLINE sequence (<code>\R</code> = CR, LF, or CRLF) or end-of-file (<code>\Z</code>).</li>
</ul>
</li>
<li>Replace With: empty
<ul>
<li>this will delete the whole line matched above, including the newline</li>
</ul>
</li>
<li>Mode = regular expression</li>
</ul>
<p dir="auto">I recommend getting the expression working with one file; once that works, <em>then</em> you can move on to using the <strong>Find in Files</strong> for all your files.</p>
<p dir="auto">With those settings, this block of text:</p>
<pre><code>ADDRESS:
ADDRESS-CITY: Christmas
ADDRESS-STATE-PROVINCE: RN
ADDRESS-POSTALCODE: 59054550
ADDRESS-COUNTRY: BRAZIL
EMAIL: mjnhx@globo.com
You tell us nothing about the remainder of the file, so I don't know whether
the following lines match your pattern, or whether they don't:
SOMETHING-ELSE: value
MORE-COLONED-LINES: here
For now, I'll assume you want to keep everything except lines that 
start with "ADDRESS...:" or "EMAIL:"
</code></pre>
<p dir="auto">would be edited to:</p>
<pre><code>You tell us nothing about the remainder of the file, so I don't know whether
the following lines match your pattern, or whether they don't:
SOMETHING-ELSE: value
MORE-COLONED-LINES: here
For now, I'll assume you want to keep everything except lines that 
start with "ADDRESS...:" or "EMAIL:"
</code></pre>
<p dir="auto">Of course, this is still making lots of assumptions.  Other possible interpretations are that you want the first six lines of any file to be deleted, whatever the text.  And it might be that the “SOMETHING-ELSE:” I indicated in the example text might also be “ADDRESS:”, in which case we’d have to tweak my regex to limit those matches to the first lines of a file, because mine assumes that any lines starting with “ADDRESS…:” or “EMAIL:” will be deleted.</p>
<p dir="auto">It would be easier to help you if you’d give all the information we need at once, rather than doling it out piecemeal.  As explained below, a good example would have examples of lines to match and lines <em>not</em> to match, and would show us both the before and after.  A good example will also be properly formatted using Markdown (like my example was) – links to Markdown help and regex help are in the boilerplate below.</p>
<p dir="auto">-----<br />
FYI: I often add this to my response in regex threads, unless I am sure the original poster has seen it before.  Here is some helpful information for finding out more about regular expressions, and for formatting posts in this forum (especially quoting data) so that we can fully understand what you’re trying to ask:</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).  If you want to clearly communicate your text data to us, you <em>need</em> to properly format it.</p>
</blockquote>
<blockquote>
<p dir="auto">If you have further search-and-replace (“matching”, “marking”, “bookmarking”, regular expression, “regex”) needs, study <a href="https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation" rel="nofollow ugc">this FAQ</a> and the documentation it points to.  Before asking a new regex question, understand that for future requests, many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backward to get things working for you.  If you need help formatting, see the paragraph above.</p>
</blockquote>
<blockquote>
<p dir="auto">Please note that for all regex and related queries, it is best if you are explicit about what needs to match, <em>and</em> what <em>shouldn’t</em> match, and have multiple examples of both in your example dataset.  Often, what <em>shouldn’t match</em> helps define the regular expression as much or more than what <em>should match</em>.</p>
</blockquote>
]]></description><link>https://community.notepad-plus-plus.org/post/42529</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42529</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 23 Apr 2019 13:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Tue, 23 Apr 2019 00:49: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> thanks…<br />
What I need:<br />
I have 100 text files, with the same format, each with several lines.<br />
6 of these lines, are present in all files and start like this:<br />
ADDRESS:<br />
ADDRESS-CITY: Christmas<br />
ADDRESS-STATE-PROVINCE: RN<br />
ADDRESS-POSTALCODE: 59054550<br />
ADDRESS-COUNTRY: BRAZIL<br />
EMAIL: <a href="mailto:mjnhx@globo.com" rel="nofollow ugc">mjnhx@globo.com</a><br />
I need to easily delete the 6 lines above.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42520</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42520</guid><dc:creator><![CDATA[Francisco]]></dc:creator><pubDate>Tue, 23 Apr 2019 00:49:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Tue, 16 Apr 2019 17:32:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francisco" aria-label="Profile: Francisco">@<bdi>Francisco</bdi></a></p>
<p dir="auto">You are correct; you cannot bookmark more than one file per marking operation.</p>
<p dir="auto">It isn’t clear to me what your real goal is exactly but it appears to be a deletion operation.  I think it is likely that this can be done totally with a regular expression replacement and not a combo of regex marking followed by boomarked lines manipulation.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42300</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42300</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 16 Apr 2019 17:32:16 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Tue, 16 Apr 2019 13:35:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan" aria-label="Profile: Alan">@<bdi>Alan</bdi></a> Kilborn, thanks, good morning everyone, I was successful using ADDRESS (? - s), selecting only the lines that start with ADDRESS. To exclude them, mark all and exclude the marked lines.<br />
Is it possible to perform this operation on all open files? I can only find, I can not mark them</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42291</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42291</guid><dc:creator><![CDATA[Francisco]]></dc:creator><pubDate>Tue, 16 Apr 2019 13:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 13 Apr 2019 12:37:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francisco" aria-label="Profile: Francisco">@<bdi>Francisco</bdi></a></p>
<p dir="auto">If you want to stay on the same line, lead off the search expression with <code>(?-s)</code>.  This tells the searcher to not allow a <code>.</code> used later to match a line ending character(s).  Thus the <code>.*</code> part won’t spillover match onto multiple lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42233</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42233</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 13 Apr 2019 12:37:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Sat, 13 Apr 2019 02:00:01 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:</p>
<blockquote>
<p dir="auto">^ADDRESS.*(\R|\Z)</p>
</blockquote>
<p dir="auto">I have a problem, the selection starts on the first line that contains the word ^ ADDRESS. * (\ R | \ Z) and ends on the last line of the file, selecting the other lines that do not start with ^ ADDRESS. Z)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42230</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42230</guid><dc:creator><![CDATA[Francisco]]></dc:creator><pubDate>Sat, 13 Apr 2019 02:00:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Fri, 12 Apr 2019 13:18:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> said:</p>
<blockquote>
<p dir="auto">find what:^ADDRESS.*$ and leave replace with empty.</p>
</blockquote>
<p dir="auto">That leaves a blank line for each deleted line.  If <a class="plugin-mentions-user plugin-mentions-a" href="/user/francisco" aria-label="Profile: Francisco">@<bdi>Francisco</bdi></a> wants the whole line, including newline, to be deleted, then the <strong>from what:</strong> could be <code>^ADDRESS.*(\R|\Z)</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/42206</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42206</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 12 Apr 2019 13:18:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Fri, 12 Apr 2019 10:32:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francisco" aria-label="Profile: Francisco">@<bdi>Francisco</bdi></a></p>
<p dir="auto">from your given example I would say<br />
find what:<code>^ADDRESS.*$</code> and leave replace with empty.<br />
<strong>BUT</strong> this assumes that the word ADDRESS <strong>REALLY</strong> starts from the line,<br />
meaning there is no space or tab or whatever special char in front of ADDRESS.</p>
<p dir="auto">MAKE YOUR BACKUP and then run it, slightly modifications might erase your whole file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42199</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42199</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 12 Apr 2019 10:32:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Fri, 12 Apr 2019 03:45:28 GMT]]></title><description><![CDATA[<p dir="auto">Please, how do I delete two lines that start with the same word, in multiple files.<br />
example:<br />
ADDRESS: aaaaaaaaaaaaaa<br />
ADDRESS-CITY: bbbbbbbbb</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42194</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42194</guid><dc:creator><![CDATA[Francisco]]></dc:creator><pubDate>Fri, 12 Apr 2019 03:45:28 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Wed, 10 Apr 2019 19:23:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicholas-wetzel" aria-label="Profile: Nicholas-Wetzel">@<bdi>Nicholas-Wetzel</bdi></a></p>
<p dir="auto">i hope your example data does not contain real email addresses and real passwords, as you have just published them to the public. 😉</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42160</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42160</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 10 Apr 2019 19:23:42 GMT</pubDate></item><item><title><![CDATA[Reply to How to mark lines with under &quot;x&quot; characters after : in a line. on Wed, 10 Apr 2019 16:22:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicholas-wetzel" aria-label="Profile: Nicholas-Wetzel">@<bdi>Nicholas-Wetzel</bdi></a>: Welcome to the Notepad++ Community.</p>
<blockquote>
<p dir="auto">Example of lines I want to keep:<br />
Example of lines I want to delete:</p>
</blockquote>
<p dir="auto">Thank you for clearly specifying both.  That helps us help you.</p>
<p dir="auto">Using the regex <code>^.*:.{1,7}(\R+|\z)</code> to find, with replace being empty, should delete those lines</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42157</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42157</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 10 Apr 2019 16:22:12 GMT</pubDate></item></channel></rss>