<?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 remove characters () and text inside]]></title><description><![CDATA[<p dir="auto">Hello Please tell me how to remove part of the text enclosed in brackets () together with these brackets INSIDE THE TAGS.<br />
For axample, we have: &lt;tag&gt;Text 1 (Text 2)&lt;/tag&gt;<br />
I need to have:<br />
&lt;tag&gt;Text 1&lt;/tag&gt;</p>
<p dir="auto">I found the expression \ (. * ) (Through regular expressions).<br />
But this replace what happens in all document.<br />
But i need to delete info (Text 2) inside the tag &lt;tag&gt;.<br />
Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19359/how-to-remove-characters-and-text-inside</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 17:30:08 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19359.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 May 2020 11:52:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to remove characters () and text inside on Sun, 10 May 2020 11:29:17 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! Yes it works.<br />
I chose to find: <code>(&lt;tag&gt;.*)\(.*\)(&lt;/tag&gt;)</code><br />
And replace with: <code>\1\2</code> or <code>$1$2</code><br />
Checkmark regular expressions</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53697</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53697</guid><dc:creator><![CDATA[Drew]]></dc:creator><pubDate>Sun, 10 May 2020 11:29:17 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove characters () and text inside on Wed, 06 May 2020 12:20:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asvc" aria-label="Profile: asvc">@<bdi>asvc</bdi></a> said in <a href="/post/53526">How to remove characters () and text inside</a>:</p>
<blockquote>
<p dir="auto">Good to know.</p>
</blockquote>
<p dir="auto">Yes, but be aware that there may be a bug with it in certain circumstances.<br />
See <a href="https://community.notepad-plus-plus.org/topic/13249/pythonscript-search-different-than-n-search-when-using-and-leading-uppercase">HERE</a>.<br />
My extra notes on that indicate the bug is in the N++ regex engine and is not specific to Pythonscript (which is maybe what the link leads one to believe).<br />
Anyway, if you choose to use <code>\&lt;</code> and <code>\&gt;</code>, YMMV. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53534</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53534</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 06 May 2020 12:20:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove characters () and text inside on Wed, 06 May 2020 10:32:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/53513">How to remove characters () and text inside</a>:</p>
<blockquote>
<p dir="auto">&lt; does not mean a literal &lt; in Notepad++'s regular expressions</p>
</blockquote>
<p dir="auto">That is interesting! I was under impression it is a more or less standard PCRE, however reading the link you have provided:</p>
<blockquote>
<p dir="auto">\&lt; ⇒ This matches the start of a word using Scintilla’s definitions of words.<br />
\&gt; ⇒ This matches the end of a word using Scintilla’s definition of words.</p>
</blockquote>
<p dir="auto">Good to know.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53526</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53526</guid><dc:creator><![CDATA[asvc]]></dc:creator><pubDate>Wed, 06 May 2020 10:32:19 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove characters () and text inside on Tue, 05 May 2020 13:19:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drew" aria-label="Profile: Drew">@<bdi>Drew</bdi></a> said in <a href="/post/53504">How to remove characters () and text inside</a>:</p>
<blockquote>
<p dir="auto">I didn’t understand what to write to find and replace.</p>
</blockquote>
<p dir="auto">Literally the text that <a class="plugin-mentions-user plugin-mentions-a" href="/user/asvc" aria-label="Profile: asvc">@<bdi>asvc</bdi></a> wrote.  Well, almost.  The <code>plaintext</code>-highlighted string in #1 was intended as the FIND, and the <code>plaintext</code>-highlighted string in #2 was the REPLACE.  What was implied, but not said, was that you had to use regular expression mode.</p>
<p dir="auto">However, the FIND expression had a bug, in that <code>\&lt;</code> does not mean a literal <code>&lt;</code> in <a href="https://npp-user-manual.org/docs/searching/#anchors" rel="nofollow ugc">Notepad++'s regular expressions</a>: it means “anchor to the beginning of a word”, and similarly for <code>\&gt;</code> meaning “end of a word”, so it did not match your example text. As <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> has tried to teach me (and I occasionally remember), don’t <em>over</em>-escape your regex, either.  A less-escaped regex which I tested on your example text is <code>(&lt;\w*&gt;.*)\(.*\)(&lt;/\w*&gt;)</code>  .  With this regex, and the text</p>
<pre><code class="language-z">&lt;tag&gt;Text 1 (Text 2)&lt;/tag&gt;
&lt;another&gt;Text 1 (Text 2)&lt;/another&gt;
&lt;tag&gt;Text 1 (Text 2)&lt;/tag&gt;
</code></pre>
<p dir="auto">it will transform to</p>
<pre><code class="language-z">&lt;tag&gt;Text 1 &lt;/tag&gt;
&lt;another&gt;Text 1 &lt;/another&gt;
&lt;tag&gt;Text 1 &lt;/tag&gt;
</code></pre>
<p dir="auto">Note: <a class="plugin-mentions-user plugin-mentions-a" href="/user/asvc" aria-label="Profile: asvc">@<bdi>asvc</bdi></a> made it extremely generic, in that it will match any tag – and my fix above will, too.  If, instead, you really want it to only remove the <code>(...)</code> from a specific tag (we’ll assume <code>tag</code>), then use a FIND of <code>(&lt;tag&gt;.*)\(.*\)(&lt;/tag&gt;)</code>, and the same REPLACE from #2.  With this regex and the example text I showed, it will transform to</p>
<pre><code class="language-z">&lt;tag&gt;Text 1 &lt;/tag&gt;
&lt;another&gt;Text 1 (Text 2)&lt;/another&gt;
&lt;tag&gt;Text 1 &lt;/tag&gt;
</code></pre>
<p dir="auto">showing that it only changed the contents of <code>&lt;tag&gt;</code>, rather than any tag.</p>
<p dir="auto">If you example data is not representative of your actual data, then these regular expressions will likely <em>not</em> work from you.  Regexes often need to be changed depending on the context of the other nearby characters</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53513</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53513</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 05 May 2020 13:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove characters () and text inside on Tue, 05 May 2020 12:25:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asvc" aria-label="Profile: asvc">@<bdi>asvc</bdi></a> said in <a href="/post/53501">How to remove characters () and text inside</a>:</p>
<blockquote>
<p dir="auto">A bit of a brute-force approach, but will do the trick:</p>
<p dir="auto">Split into 3 groups:<br />
(&lt;\w*&gt;.<em>)(.</em>)(&lt;/\w*&gt;)<br />
Join two groups:<br />
\1\2</p>
</blockquote>
<p dir="auto">Sorry, but I didn’t understand.<br />
Should I find something like:<br />
(&lt;tag&gt;.<em>)(.</em>)(&lt;/tag&gt;)<br />
And replace with:<br />
&lt;tag&gt;\1\2&lt;/tag&gt;</p>
<p dir="auto">I didn’t understand what to write to find and replace.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53504</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53504</guid><dc:creator><![CDATA[Drew]]></dc:creator><pubDate>Tue, 05 May 2020 12:25:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove characters () and text inside on Tue, 05 May 2020 12:00:03 GMT]]></title><description><![CDATA[<p dir="auto">A bit of a brute-force approach, but will do the trick:</p>
<ol>
<li>Split into 3 groups:<br />
<code>(\&lt;\w*\&gt;.*)\(.*\)(\&lt;\/\w*\&gt;)</code></li>
<li>Join two groups:<br />
<code>\1\2</code></li>
</ol>
]]></description><link>https://community.notepad-plus-plus.org/post/53501</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53501</guid><dc:creator><![CDATA[asvc]]></dc:creator><pubDate>Tue, 05 May 2020 12:00:03 GMT</pubDate></item></channel></rss>