<?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[Search and replace help]]></title><description><![CDATA[<p dir="auto">In search and replace I’ve typed (without the quotes)<br />
“&lt;html tag&gt;.*&lt;/html tag&gt;” and pressed find.</p>
<p dir="auto">I expected this to find the first instance of &lt;html tag&gt; in the document and the first instance of &lt;/html tag&gt; and highlight them and everything in between.</p>
<p dir="auto">Didn’t quite work, it found the first instance of &lt;html tag&gt; and the last instance of &lt;/html tag&gt; and highlighted near enough the whole document.</p>
<p dir="auto">What did I do wrong and how do I make it do what I expected?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14555/search-and-replace-help</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 09:37:44 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14555.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Oct 2017 10:35:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Search and replace help on Wed, 04 Oct 2017 12:22:25 GMT]]></title><description><![CDATA[<p dir="auto">Notepad</p>
]]></description><link>https://community.notepad-plus-plus.org/post/27166</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/27166</guid><dc:creator><![CDATA[Anil Ani]]></dc:creator><pubDate>Wed, 04 Oct 2017 12:22:25 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace help on Tue, 03 Oct 2017 19:28:39 GMT]]></title><description><![CDATA[<p dir="auto">Slight edit:</p>
<p dir="auto">…and substitute that for your <code>contents of clipboard</code> string in the replace-with zone (yes, you would use exactly <code>contents of clipboard</code>&lt;html tag&gt; in that zone–the <strong>contents of clipboard</strong> part would be like a “token”…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/27135</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/27135</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 03 Oct 2017 19:28:39 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace help on Tue, 03 Oct 2017 19:19:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan-leitch" aria-label="Profile: Dan-Leitch">@<bdi>Dan-Leitch</bdi></a></p>
<p dir="auto">It is not possible to do this with stock Notepad++.  However, in the spirit of “it’s software, most things are possible”, I think it could be done.  Here’s how:</p>
<p dir="auto">Using the Pythonscript plugin and the ctypes library, hook into the message processing loop for the Find window’s Replace button.  When you detect that the user has pressed that button, get the data out of the clipboard and substitute that for your <code>contents of clipboard</code> string in the replace-with zone (yes, you would use exactly <code>contents of clipboard&lt;html tag&gt;</code> in that zone–the <code>clipboard contents</code> part would be like a “token”…).  Then give the new Replace-with zone data to Notepad++ to do the (normal) replace function.</p>
<p dir="auto">Easy? No.  Doable? Probably.  :-D</p>
]]></description><link>https://community.notepad-plus-plus.org/post/27132</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/27132</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 03 Oct 2017 19:19:25 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace help on Tue, 03 Oct 2017 18:10:56 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, another question, is there a way using search and replace to do this</p>
<p dir="auto">Replace “&lt;html tag&gt;”</p>
<p dir="auto">With “<em>contents of clipboard</em> &lt;html tag&gt;”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/27129</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/27129</guid><dc:creator><![CDATA[Dan Leitch]]></dc:creator><pubDate>Tue, 03 Oct 2017 18:10:56 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace help on Sun, 01 Oct 2017 12:39:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan-leitch" aria-label="Profile: Dan-Leitch">@<bdi>Dan-Leitch</bdi></a></p>
<p dir="auto">The <code>.*</code> regular expression will match the <em>MOST</em> that it can.  Try <code>.*?</code> as that will match minimally, i.e., in your example you’ll get the closest match of <code>&lt;/html tag&gt;</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/27072</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/27072</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sun, 01 Oct 2017 12:39:48 GMT</pubDate></item></channel></rss>