<?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 delete &quot;(....)&quot; but only in certain lines]]></title><description><![CDATA[<p dir="auto">Here’s the scenario:</p>
<p dir="auto">I have these lines</p>
<p dir="auto"><strong>&lt;name&gt;game name 1 (gibberish)&lt;/name&gt;<br />
This is a (nice) game</strong></p>
<p dir="auto"><strong>&lt;name&gt;game name 2 (gibberish)&lt;/name&gt;<br />
This is a (great) game</strong></p>
<p dir="auto">And i need this result:</p>
<p dir="auto"><strong>&lt;name&gt;game name 1&lt;/name&gt;<br />
This is a (nice) game</strong></p>
<p dir="auto"><strong>&lt;name&gt;game name 2&lt;/name&gt;<br />
This is a (great) game</strong></p>
<p dir="auto">Basically, i need to remove the (…) from the names but not from the descriptions.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22667/how-to-delete-but-only-in-certain-lines</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 03:40:32 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22667.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Mar 2022 14:15:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Sat, 05 Mar 2022 11:26:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>,</p>
<p dir="auto">After further <strong>testing</strong>, I came to the conclusion to <strong>keep</strong> the present syntax <strong><code>(?\A)</code></strong>. Refer to this post for some explanations :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/74937">https://community.notepad-plus-plus.org/post/74937</a></p>
<p dir="auto">So, sorry for the noise. I’m going to <strong>reformat</strong> most of my notes, concerning this <strong>specific</strong> regex.</p>
<p dir="auto">Then I will send it to you by <strong>mail</strong> for checking before finding a <strong>final</strong> destination for it !</p>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74938</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74938</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 05 Mar 2022 11:26:19 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Fri, 04 Mar 2022 14:04: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> said in <a href="/post/74890">How to delete "(....)" but only in certain lines</a>:</p>
<blockquote>
<p dir="auto">OR, maybe some brand new thread?</p>
</blockquote>
<p dir="auto">I would second the brand-new-thread suggestion.  That way, it doesn’t have the confusing context of a specific question with details that don’t match the person’s that we’re pointing to the post.  (it goes back to my <a href="https://community.notepad-plus-plus.org/topic/20942/developing-generic-regex-sequences">Developing generic regex sequences</a> from last year, where I wanted to allow us to develop the generics in that thread, then when they were ready, spawn each generic off to a separate “official” topic, and maybe have a post in the FAQ that links to the “official” version)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74895</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74895</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 04 Mar 2022 14:04:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Fri, 04 Mar 2022 12:29:00 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/74874">How to delete "(....)" but only in certain lines</a>:</p>
<blockquote>
<p dir="auto">I suppose that we would take avantage to adopt the <a class="plugin-mentions-user plugin-mentions-a" href="/user/hellena-crainicu" aria-label="Profile: hellena-crainicu">@<bdi>hellena-crainicu</bdi></a> syntax (?!^) ( instead of (?!\A) ) !</p>
</blockquote>
<p dir="auto">So how about adding that in the canonical posting linked above; this one to be specific:</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/62799">https://community.notepad-plus-plus.org/post/62799</a></p>
<p dir="auto">Please DON’T edit that posting, because a lot of things already like to that, and editing it now would make it confusing.  Add a new post in that owner thread, with the updated technique.  OR, maybe some brand new thread?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74890</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74890</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 04 Mar 2022 12:29:00 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Fri, 04 Mar 2022 04:32:13 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>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: terry-r">@<bdi>terry-r</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/astrosofista" aria-label="Profile: astrosofista">@<bdi>astrosofista</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">As I reported in the <strong>second</strong> part of this post :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/74410">https://community.notepad-plus-plus.org/post/74410</a></p>
<p dir="auto">and with <strong>further</strong> explanations in this one :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/74418">https://community.notepad-plus-plus.org/post/74418</a></p>
<p dir="auto">I suppose that we would take <strong>avantage</strong> to adopt the <a class="plugin-mentions-user plugin-mentions-a" href="/user/hellena-crainicu" aria-label="Profile: hellena-crainicu">@<bdi>hellena-crainicu</bdi></a> syntax <strong><code>(?!^)</code></strong> ( instead of <strong><code>(?!\A)</code></strong> ) !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74874</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74874</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 04 Mar 2022 04:32:13 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 15:25:03 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">Thanks for the guidelines and solution. I appreciate it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74831</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74831</guid><dc:creator><![CDATA[Imgema]]></dc:creator><pubDate>Thu, 03 Mar 2022 15:25:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:55:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imgema" aria-label="Profile: imgema">@<bdi>imgema</bdi></a> ,</p>
<p dir="auto">Remember the old adage, “Give a man a fish, feed him for a day; teach a man to fish, feed him for a lifetime”?  I was trying to teach, rather than than give.  Sorry.</p>
<p dir="auto">Here are the steps I was hoping you would be able to figure out.</p>
<p dir="auto">Step 1: Read the <a href="https://community.notepad-plus-plus.org/post/62799">post</a> I linked you to.<br />
Step 2: find the formula I mentioned</p>
<blockquote>
<ul>
<li>Let <strong>FR</strong> (<strong><code>Find Regex</code></strong> ) be the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> to be searched</li>
<li>Let <strong>RR</strong> (<strong><code>Replacement Regex</code></strong> ) be the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> which must replace the <strong>FR</strong> expression</li>
<li>Let <strong>BSR</strong> ( <strong><code>Begin Search-region Regex</code></strong> ) be the regex which defines the <strong>beginning</strong> of the area where the search for <strong>FR</strong>, must <strong>start</strong></li>
<li>Let <strong>ESR</strong> ( <strong><code>End Search-region Regex</code></strong>) be the regex which defines, <strong>implicitly</strong>, the area where the search for <strong>FR</strong>, must <strong>end</strong></li>
</ul>
<p dir="auto">Then, the <strong>generic</strong> regex can be expressed :<br />
SEARCH <strong><code>(?-i:</code>BSR<code>|(?!\A)\G)(?s:(?!</code>ESR<code>).)*?\K(?-i:</code>FR<code>)</code></strong><br />
REPLACE <strong>RR</strong></p>
</blockquote>
<p dir="auto">Step3: Figure out what <strong>FR</strong> should be: I gave you this already: <code>\h?\(.*?\)</code><br />
Step4: Figure out what <strong>BSR</strong> should be: I gave you hints already: <code>&lt;name&gt;</code><br />
Step5: Figure out what <strong>ESR</strong> should be: I gave you hints already: <code>&lt;/name&gt;</code><br />
Step6: Figure out what <strong>RR</strong> should be: I think this is obviously the empty string<br />
Step7: plug those back in:</p>
<ul>
<li>7a: plug <strong>FR</strong> into the expression: <strong><code>(?-i:</code>BSR<code>|(?!\A)\G)(?s:(?!</code>ESR<code>).)*?\K(?-i:\h?\(.*?\))</code></strong></li>
<li>7b: plug <strong>BSR</strong> into the expression: <strong><code>(?-i:&lt;name&gt;|(?!\A)\G)(?s:(?!</code>ESR<code>).)*?\K(?-i:\h?\(.*?\))</code></strong></li>
<li>7c: plug <strong>ESR</strong> into the expression:  <strong><code>(?-i:&lt;name&gt;|(?!\A)\G)(?s:(?!&lt;/name&gt;).)*?\K(?-i:\h?\(.*?\))</code></strong></li>
<li>7d: type that final expression from 7c into the FIND box</li>
</ul>
<p dir="auto">Step8: type the <strong>RR</strong> expression (the empty string) into the REPLACE box<br />
Step9: check the <strong>Regular Expression</strong> box<br />
Step10: click <strong>Replace All</strong></p>
<p dir="auto">It works:</p>
<p dir="auto">BEFORE:<br />
<img src="/assets/uploads/files/1646319221264-d14ae289-41b2-498f-9315-c1d69ef535c8-image.png" alt="d14ae289-41b2-498f-9315-c1d69ef535c8-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">AFTER:<br />
<img src="/assets/uploads/files/1646319231071-6eddab62-435d-44b1-b256-80aa686a155f-image.png" alt="6eddab62-435d-44b1-b256-80aa686a155f-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/74830</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74830</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:55:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:52:15 GMT]]></title><description><![CDATA[<p dir="auto">Not really my data, i don’t know how to code, i’m trying to modify a xml that was generated by a program.</p>
<p dir="auto">Thanks anyway, i’ll try to maybe figure it out then.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74829</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74829</guid><dc:creator><![CDATA[Imgema]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:52:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:45:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imgema" aria-label="Profile: imgema">@<bdi>imgema</bdi></a> said in <a href="/post/74827">How to delete "(....)" but only in certain lines</a>:</p>
<blockquote>
<p dir="auto">I’m sorry, this is over my head.</p>
</blockquote>
<p dir="auto">It <em>can’t</em> be, this is <em>your</em> data you need to manipulate.</p>
<blockquote>
<p dir="auto">I don’t know what these FR and BSR words mean.</p>
</blockquote>
<p dir="auto">Did you even read the linked posting?<br />
It’s all right there.</p>
<blockquote>
<p dir="auto">I was looking for a code to use as is.</p>
</blockquote>
<p dir="auto">Sure, I wish I had someone to do all my work for me, too.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74828</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74828</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:45:23 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:41:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a><br />
I’m sorry, this is over my head. I don’t know what these FR and BSR words mean.</p>
<p dir="auto">I was looking for a code to use as is.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74827</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74827</guid><dc:creator><![CDATA[Imgema]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:33:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imgema" aria-label="Profile: imgema">@<bdi>imgema</bdi></a> ,</p>
<p dir="auto">Not if you followed the directions in the post I linked you to.  <strong>FR</strong> doesn’t go by itself in the <strong>Find</strong> box; there are other pieces that are required for the logic to work.</p>
<p dir="auto">But that other post explains exactly what you need to do:  You have to figure out what the <strong>BSR</strong>, <strong>ESR</strong>, and <strong>RR</strong> need to be for your circumstances – it’s pretty easy to do, since those are just the “begin” and “end” conditions for which sections you want to include (I’ll give you a hint: those values will look a lot like XML tags), and since you want to replace it with nothing, I think <strong>RR</strong> will be obvious.  Once you have figured out what those values need to be, you have to look at the expression that Guy supplied in that post I linked you to, and type those values instead of <strong>FR</strong>, <strong>BSR</strong>, <strong>ESR</strong>, and <strong>RR</strong> in the Find/Replace boxes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74826</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74826</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:25: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></p>
<p dir="auto">Thanks but this code also replaces the (…) from the descriptions</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74825</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74825</guid><dc:creator><![CDATA[Imgema]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:25:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete &quot;(....)&quot; but only in certain lines on Thu, 03 Mar 2022 14:24:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imgema" aria-label="Profile: imgema">@<bdi>imgema</bdi></a> ,</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/62799">This post</a> gives a formula for how to do a search-and-replace, but make it match only when it’s between certain start and end triggers (the <strong>BSR</strong> and <strong>ESR</strong> of that post’s formula).</p>
<p dir="auto">The only difficult thing about applying that formula to your use-case is that you want to match literal parentheses, which have special meaning in regular expressions.  For that, I believe the regular expression you will want for <strong>FR</strong> will be <code>\h?\(.*?\)</code> .  (The <code>\h?</code> says that it will match the space before the open-<code>(</code> if there is one; the <code>\</code> before the <code>(</code> and <code>)</code> is the <a href="https://npp-user-manual.org/docs/searching/#single-character-matches" rel="nofollow ugc">regex indicator</a> that the character following should be treated as a literal character instead of its regex special meaning)</p>
<p dir="auto">-—</p>
<h3>Useful References</h3>
<ul>
<li><a href="https://community.notepad-plus-plus.org/topic/21965/please-read-before-posting">Please Read Before Posting</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/22022/template-for-search-replace-questions">Template for Search/Replace Questions</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">FAQ: Where to find regular expressions (regex) documentation</a></li>
<li><a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">Notepad++ Online User Manual: Searching/Regex</a></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/74824</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74824</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:24:24 GMT</pubDate></item></channel></rss>