<?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[Find & Replace]]></title><description><![CDATA[<p dir="auto">Hello, I am a very basic user of Notepad++</p>
<p dir="auto">I have a file that I would like to make a number of changes to a particular text within the file without affecting other variables in the text string</p>
<p dir="auto">An example is<br />
I have approximately 660 entries of the following text</p>
<pre><code> &lt;p n='OSS_HeatingSetPoint' h='123eb7' t='c:NumericPoint'&gt;
</code></pre>
<p dir="auto">However, the ‘123eb7’ will change line to line</p>
<p dir="auto">I need to be able to find ‘OSS_HeatingSetPoint’<br />
And change ‘c:NumericPoint’<br />
To ‘c:NumericWritable’</p>
<p dir="auto">Without affecting the ‘123eb7’ number (this number will change line to line so need to ignore this)</p>
<p dir="auto">If someone could offer any assistance, would be greatly appreciated.</p>
<p dir="auto">Regards</p>
<p dir="auto">Blair</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26182/find-replace</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 08:14:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26182.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Oct 2024 19:27:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find & Replace on Tue, 15 Oct 2024 21:06:59 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/97106">Find &amp; Replace</a>:</p>
<blockquote>
<p dir="auto">When the Regular expression search mode is set, running the Boost regex engine :</p>
</blockquote>
<p dir="auto">And<br />
Sixthly, you may use \Q$\E which allows <strong>any</strong> characters within the \Q and \E to be accepted as literals within a regular expression. In this example the <strong>$</strong> is the literal character.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97110</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97110</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Tue, 15 Oct 2024 21:06:59 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Tue, 15 Oct 2024 20:00:03 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/97106">Find &amp; Replace</a>:</p>
<p dir="auto">For this:</p>
<blockquote>
<p dir="auto">When the Extended search mode is set :</p>
</blockquote>
<p dir="auto">You forgot one:</p>
<p dir="auto"><code>$</code> ( the character <strong>itself</strong> )</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97109</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97109</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 15 Oct 2024 20:00:03 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Tue, 15 Oct 2024 19:39:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/blair-rollinson" aria-label="Profile: blair-rollinson">@<bdi>blair-rollinson</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">To complete the <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>’s reply, here are <strong>all</strong> the ways to search for a <strong>literal</strong> <strong><code>$</code></strong> sign, within N++ :</p>
<ul>
<li>
<p dir="auto">When the <strong><code>Normal</code></strong> search mode is <strong>set</strong> :</p>
<ul>
<li><strong><code>$</code></strong> ( the character <strong>itself</strong> )</li>
</ul>
</li>
</ul>
<p dir="auto"></p>
<ul>
<li>
<p dir="auto">When the <strong><code>Extended</code></strong> search mode is <strong>set</strong> :</p>
<ul>
<li>
<p dir="auto"><strong><code>\d036</code></strong> ( <strong>decimal</strong> value )</p>
</li>
<li>
<p dir="auto"><strong><code>\x24</code></strong> ( <strong>Hexadecimal</strong> value )</p>
</li>
<li>
<p dir="auto"><strong><code>\o044</code></strong> ( <strong>Octal</strong> value )</p>
</li>
<li>
<p dir="auto"><strong><code>\b00100100</code></strong> ( <strong>Binary</strong> value )</p>
</li>
</ul>
</li>
<li>
<p dir="auto">When the <strong><code>Regular expression</code></strong> search mode is <strong>set</strong>, running the <strong><code>Boost</code></strong> regex engine :</p>
<ul>
<li>
<p dir="auto">First, you can use the <strong>escaped</strong> value of this character : <strong><code>\$</code></strong></p>
</li>
<li>
<p dir="auto">Secondly, you can place this character within a <strong>character class</strong> : <strong><code>[$]</code></strong></p>
</li>
<li>
<p dir="auto">Thirdly, you may use its <strong>hexadecimal</strong> <em>Unicode</em> value, so <strong>one</strong> of the <strong>three</strong> syntaxes : <strong><code>\x24</code></strong> or <strong><code>\x{24}</code></strong> or <strong><code>\x{0024}</code></strong></p>
</li>
<li>
<p dir="auto">Fourthly, you may use its <strong>octal</strong> <em>Unicode</em> value, so <strong>one</strong> of the <strong>txo</strong> syntaxes : <strong><code>\044</code></strong> or <strong><code>\0044</code></strong></p>
</li>
<li>
<p dir="auto">Fifthly, you may use its <strong>symbolic</strong> value , so <strong>one</strong> of the <strong>two</strong> syntaxes : <strong><code>\N{dollar-sign}</code></strong> or, inside a <strong>class character</strong> <strong><code>[[.dollar-sign.]]</code></strong></p>
</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto">Of course, you certainly guess that I <strong>personally</strong> use the <strong><code>Regular expression</code></strong> search mode and, like everybody, the most <strong>simple</strong> syntax, i.e. <strong><code>\$</code></strong></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97106</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97106</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 15 Oct 2024 19:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Mon, 14 Oct 2024 12:58:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blair-rollinson" aria-label="Profile: Blair-Rollinson">@<bdi>Blair-Rollinson</bdi></a> said in <a href="/post/97087">Find &amp; Replace</a>:</p>
<blockquote>
<p dir="auto">I assume the $ means something in the search function<br />
Can you advise how to include the $ in the search string</p>
</blockquote>
<p dir="auto">…</p>
<blockquote>
<p dir="auto">I found out how to do it</p>
</blockquote>
<p dir="auto">For anyone who is reading this, and wonders what the mysterious fix was: <code>$</code> in a regular expression search means “end of line”; to match the literal <code>$</code> character in a <strong>Search Mode</strong> = <code>Regular Expression</code> search, it needs to be “escaped” as <code>\$</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/97091</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97091</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 14 Oct 2024 12:58:59 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Mon, 14 Oct 2024 06:23:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello Peter</p>
<p dir="auto">I found out how to do it<br />
I think I am all good now</p>
<p dir="auto">Thanks for your help</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97088</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97088</guid><dc:creator><![CDATA[Blair Rollinson]]></dc:creator><pubDate>Mon, 14 Oct 2024 06:23:32 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Mon, 14 Oct 2024 12:56:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello Peter</p>
<p dir="auto">Thanks for the help<br />
That work great<br />
I have tweaked the search to find various search strings</p>
<p dir="auto">However, I have a couple of more searches which I think the $ sign in the search is screwing up the search as it fails to find any results<br />
I assume the $ means something in the search function</p>
<pre><code>  &lt;p n="DamperPos$40SetPoint" h="7d" t="c:NumericPoint"&gt;
   &lt;p n="$30$25_Select" h="81" t="c:BooleanPoint"&gt;
  &lt;p n="$324_7_Required" h="a2" t="c:BooleanPoint"&gt;
</code></pre>
<p dir="auto">Can you advise how to include the $ in the search string</p>
<p dir="auto">Regards</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97087</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97087</guid><dc:creator><![CDATA[Blair Rollinson]]></dc:creator><pubDate>Mon, 14 Oct 2024 12:56:49 GMT</pubDate></item><item><title><![CDATA[Reply to Find & Replace on Wed, 09 Oct 2024 19:42:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blair-rollinson" aria-label="Profile: Blair-Rollinson">@<bdi>Blair-Rollinson</bdi></a> ,</p>
<p dir="auto">Using regex (SEARCH MODE = Regular Expression), there are multiple ways of doing it.  One such solution, assuming that the <code>&lt;p ....&gt;</code> tags <em>always</em> have the n/h/t attributes are always in that order, always with single quotes, always with a single space in between:</p>
<ul>
<li>FIND = <code>(&lt;p n='OSS_HeatingSetPoint' h='.*?' t=)'c:NumericPoint'&gt;</code><br />
REPLACE = <code>$1'c:NumericWriteable'&gt;</code><br />
SEARCH MODE = <code>Regular Expression</code><br />
do not checkmark <code>☐ . matches newline</code></li>
</ul>
<p dir="auto">The (…) section of the regex puts all of that text into group#1, and the <code>$1</code> in the replacement says “use the value of group1 here”.  The <code>'.*?'</code> in the h-attribute’s value means “match 0 or more of any character (except a newline) between the single quotes”.</p>
<p dir="auto">If your HTML isn’t perfectly regular like that (if attributes are in different orders, or sometimes the attributes use double quotes instead of single quotes, or if the paragraph tag internals are split across multiple lines instead of in one line like you showed), then my simple regex won’t work, and you will need to read and understand our FAQ as to why <a href="/topic/25304">regex should not be used to edit JSON/HTML/XML</a>.  But if your HTML is perfectly regular, my regex might just work for you.</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/21925/faq-desk-formatting-forum-posts">Formatting Forum Posts</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>
<li><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">FAQ: Where to find other regular expressions (regex) documentation</a></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/97000</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97000</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 09 Oct 2024 19:42:18 GMT</pubDate></item></channel></rss>