<?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 write parentheses in replacement, using the &quot;Regular expression&quot; mode ?]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/vuvanvui-vui" aria-label="Profile: vuvanvui-vui">@<bdi>vuvanvui-vui</bdi></a>, and <strong>All</strong>,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vuvanvui-vui" aria-label="Profile: vuvanvui-vui">@<bdi>vuvanvui-vui</bdi></a> send me an <strong>e-mail</strong>, today, saying :</p>
<blockquote>
<p dir="auto">hello Guy, how are you today,<br />
hmm i have a question on notepad ++</p>
</blockquote>
<blockquote>
<p dir="auto">in Regular express mode i can’t replace something = “(”, “)”</p>
</blockquote>
<blockquote>
<p dir="auto">exam: i want to replace: Guy = (Guy)<br />
the () is lost in result<br />
thanks and sorry for my bad english :D</p>
</blockquote>
<p dir="auto">As I think that the solution may be <strong>useful</strong> for others, I prefer to reply on our <strong>site</strong> !</p>
<hr />
<p dir="auto">Quite easy ! In the <strong>Replacement</strong> zone, you must simply <strong>escape</strong> the <strong>parentheses</strong> with the usual <strong><code>\</code></strong> symbol ;-)). So :</p>
<p dir="auto">SEARCH <strong><code>Guy</code></strong></p>
<p dir="auto">REPLACE <strong><code>\(Guy\)</code></strong> ( or even  <strong><code>\x28Guy\x29</code></strong> )</p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>six</code></strong> characters, which have to be <strong>escaped</strong>, with the <strong>backslash</strong> <strong><code>\</code></strong> symbol, are :</p>
<ul>
<li>The <strong>backslash</strong> symbol <strong><code>\</code></strong></li>
<li>The <strong>left</strong> parenthesis <strong><code>(</code></strong></li>
<li>The <strong>right</strong> parenthesis <strong><code>)</code></strong></li>
<li>The <strong>dollar</strong> sign <strong><code>$</code></strong></li>
<li>The <strong>question mark</strong> punctuation sign <strong><code>?</code></strong></li>
<li>The <strong>colon</strong> punctuation sign <strong><code>:</code></strong></li>
</ul>
</li>
<li>
<p dir="auto">The <strong>above</strong> signs have a <strong>specific</strong> meaning, in the <strong>Boost Format String</strong> library ! Just refer to :</p>
</li>
</ul>
<p dir="auto"><a href="http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html" rel="nofollow ugc">http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html</a></p>
<ul>
<li>Most of the time, in <strong>replacement</strong>, the <strong><code>$</code></strong>, <strong><code>?</code></strong> and <strong><code>:</code></strong> symbols do <strong>not</strong> need to be <strong>escaped</strong> !</li>
</ul>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15427/how-to-write-parentheses-in-replacement-using-the-regular-expression-mode</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 01:27:30 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15427.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Mar 2018 20:20:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to write parentheses in replacement, using the &quot;Regular expression&quot; mode ? on Mon, 19 Mar 2018 15:04:20 GMT]]></title><description><![CDATA[<p dir="auto">Funny enough: another <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4288" rel="nofollow ugc">same question</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30995</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30995</guid><dc:creator><![CDATA[古旮]]></dc:creator><pubDate>Mon, 19 Mar 2018 15:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to write parentheses in replacement, using the &quot;Regular expression&quot; mode ? on Mon, 19 Mar 2018 05:25:14 GMT]]></title><description><![CDATA[<p dir="auto">Haha. This is a <a href="https://notepad-plus-plus.org/community/topic/12839/what-s-regex-syntax-of-replace-with/3" rel="nofollow ugc">question</a> I asked more than a year ago, to which guy038 also gave valuable reply.<br />
Seriously, is there a way to edit <a href="http://docs.notepad-plus-plus.org/index.php/Main_Page" rel="nofollow ugc">NPP wiki</a>? I can’t find how to register. And the <a href="http://docs.notepad-plus-plus.org/index.php/Regular_Expressions" rel="nofollow ugc">Regular Expression Page</a> is incomplete and still has some obvious errors.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30989</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30989</guid><dc:creator><![CDATA[古旮]]></dc:creator><pubDate>Mon, 19 Mar 2018 05:25:14 GMT</pubDate></item><item><title><![CDATA[Reply to How to write parentheses in replacement, using the &quot;Regular expression&quot; mode ? on Mon, 19 Mar 2018 00:42:00 GMT]]></title><description><![CDATA[<p dir="auto">thanks a lot ;)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30980</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30980</guid><dc:creator><![CDATA[Vuvanvui Vui]]></dc:creator><pubDate>Mon, 19 Mar 2018 00:42:00 GMT</pubDate></item></channel></rss>