<?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[Regex: How do I search for My_String [any characters] [quotation mark] ?]]></title><description><![CDATA[<p dir="auto">I’m looking to do a search and replace.</p>
<p dir="auto">I need to find My_String followed by <strong>any</strong> characters, of any length, until a quotation mark is reached.</p>
<p dir="auto">e.g. My_String<em>abcedef12345</em>" would match, and I need to replace the <em>abcedef12345</em> with something else, i.e. abcedef12345.mhtml (so I’m adding .mhtml basically, then the original " back)</p>
<p dir="auto">Here’s what I have:</p>
<p dir="auto"><strong>find</strong>: My_String(\*)"</p>
<p dir="auto"><strong>replace</strong>: My_String\1.mhtml"</p>
<p dir="auto">I’m hoping the \1 is captured in the (*)<br />
%10abcdef12345@#-_+" would also match… so not just alphanum</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23747/regex-how-do-i-search-for-my_string-any-characters-quotation-mark</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 17:34:03 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23747.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Nov 2022 19:53:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:49:33 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> Ah, thats good to know, thanks !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81593</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81593</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:49:33 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:46:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> ,</p>
<p dir="auto">I just checked; yes, saving a webpage as .mhtml from a major browser will use quoted-printable.</p>
<p dir="auto">If you really want to correctly do this:<br />
<img src="/assets/uploads/files/1668631475043-b51566b2-3818-44da-ae91-9e391acbcc46-image.png" alt="b51566b2-3818-44da-ae91-9e391acbcc46-image.png" class=" img-fluid img-markdown" /></p>
<ol>
<li>Select one part (the HTML part of the multipart, for example)<br />
<img src="/assets/uploads/files/1668631505945-7ba2d2b6-b23b-4324-9aa4-9dffc06a5b90-image.png" alt="7ba2d2b6-b23b-4324-9aa4-9dffc06a5b90-image.png" class=" img-fluid img-markdown" /></li>
<li>Plugins &gt; MIME Tools &gt; Quoted Printable Decode<br />
<img src="/assets/uploads/files/1668631537952-38b62dc5-c946-4a92-a1d1-2a8f1a709ea0-image.png" alt="38b62dc5-c946-4a92-a1d1-2a8f1a709ea0-image.png" class=" img-fluid img-markdown" /></li>
<li>Do your search/replace</li>
<li>Select all that text again</li>
<li>Plugins &gt; MIME Tools &gt; Quoted Printable Encode</li>
</ol>
<p dir="auto">You will find it’s much easier to work with that way.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81591</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81591</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:46:36 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:44: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><br />
I’m trying to download my website for offline viewing.  I downloaded .mhtml files.  There seemed to be no other option for .mhtml saving - the default seems to have been this Quoted Printable format you mentioned.</p>
<p dir="auto">I took out all the <code>=\r\n</code> episodes in all the .mhtml files and loaded them back into my browser.<br />
Nothing seems to have changed.  Its browsing and viewing them all fine.   Now my other search and replace tasks will be easier.<br />
All I am needing is offline browsing.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81590</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81590</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:44:17 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:35:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> ,</p>
<p dir="auto">Wait, 72 character line length and = ending a line. I think your <a href="https://en.wikipedia.org/wiki/MHTML" rel="nofollow ugc">.mhtml</a> might be using <a href="https://en.wikipedia.org/wiki/Quoted-printable" rel="nofollow ugc">Quoted Printable</a>.  The <code>=</code> at the end of a line does have a meaning in QP.</p>
<p dir="auto">You really need to learn the file types you are editing before you start hacking around at things willy-nilly.  Good luck getting that .mhtml to work right after all your edits.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81589</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81589</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:21:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neil-schipper" aria-label="Profile: Neil-Schipper">@<bdi>Neil-Schipper</bdi></a> thanks,  yes, I just did that a few mins ago.<br />
I was concerned that .mhtml file was limiting line length to 76 chars for a reason.<br />
I blew the <code>=\r\n</code> away for all the files, and they load up in the browser OK, so hopefully the <code>=</code> was not critical.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81587</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81587</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 20:16:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> If you’re confident a trailing equal sign <code>=\R</code> won’t ever appear in a context where you want to preserve it, then do a pass where you just blow them all away (before the pass where you do other text replacement).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81586</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81586</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Wed, 16 Nov 2022 20:16:01 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 19:03:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> said in <a href="/post/81560">Regex: How do I search for My_String [any characters] [quotation mark] ?</a>:</p>
<blockquote>
<p dir="auto">What happens if I want to keep some of what I find in the search string in the replacement string?</p>
</blockquote>
<p dir="auto">I guess that could get tricky.<br />
I don’t have all the answers. :-(<br />
I suppose it is something you have to experiment with, see if you can make it do what you want it to.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81564</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81564</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 16 Nov 2022 19:03:40 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 18:54:14 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> I’ll give that a try.<br />
What happens if I want to keep some of what I find in the search string in the replacement string?</p>
<p dir="auto">E.g. lets say I find:<br />
MyStringAbcd=<br />
efg12345xyz</p>
<p dir="auto">And I want to replace it with:<br />
MyNewStringAbcdefg99999xyz</p>
<p dir="auto">Is it possible to store in, for example, ${1} the Abcdefg ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81560</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81560</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Wed, 16 Nov 2022 18:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 18:24:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a></p>
<blockquote>
<p dir="auto">Is there anything I can add to the search term to include the possibility of finding an equals sign in the midst of a search phrase ?</p>
</blockquote>
<p dir="auto">I suppose you could change the script part where it uses <code>r'\h*'</code> to be <code>r'[\h=]*</code> instead…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81554</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81554</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 16 Nov 2022 18:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Wed, 16 Nov 2022 16:41:21 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> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
thanks, I installed that and it appears its working for me.</p>
<p dir="auto">To add a little complication into the mix, I am searching in .mhtml files.<br />
These files have a habit of putting an ‘=’ (equals sign) sign at the end of many lines.  Is there anything I can add to the search term to include the possibility of finding an equals sign in the midst of a search phrase ?</p>
<p dir="auto">So, I might get:  MyStringabcdef=<br />
ghijklm12345</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81541</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81541</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Wed, 16 Nov 2022 16:41:21 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 21:58:30 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/81510">Regex: How do I search for My_String [any characters] [quotation mark] ?</a>:</p>
<blockquote>
<p dir="auto">I think <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> has a script he published a few months back that does a “space insensitive” search</p>
</blockquote>
<p dir="auto"><a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12402#issuecomment-1293680394" rel="nofollow ugc">HERE</a> is the requested script (only 3 weeks old, not months).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81512</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81512</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 15 Nov 2022 21:58:30 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 21:50:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> ,</p>
<p dir="auto">You mean, we can no longer assume that <code>My_String</code> prefix will be all together?  That makes it harder.</p>
<p dir="auto">If we could assume <code>My_String</code> prefix was always on the same line, then <code>My_String((?s).*?)"</code> would match, and everything (including the newline) would be in <code>${1}</code> for the replacement.</p>
<p dir="auto">However, if we can no longer assume that, we will have to have one capture group per letter, with an optional newline between every single character</p>
<ul>
<li>FIND = <code>(T)\R?(h)\R?(i)\R?(s)\R?(I)\R?(s)\R?(T)\R?(h)\R?(e)\R?(S)\R?(t)\R?(r)\R?(i)\R?(n)\R?(g)\R?(I)\R?(A)\R?(m)\R?(S)\R?(e)\R?(a)\R?(r)\R?(c)\R?(h)\R?(i)\R?(n)\R?(g)\R?(F)\R?(o)\R?(r)\R?"</code></li>
<li>REPLACE = <code>${1}${2}${3}...${29}${30}.mhtml"</code><br />
(I did not show all thirty <code>${N}</code>… I hope you can figure out what goes in the …)</li>
</ul>
<p dir="auto">I think <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> has a script he published a few months back that does a “space insensitive” search, but i am having trouble finding it.  I hope he can post a link to it, because I think that might work better for you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81510</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81510</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 15 Nov 2022 21:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 21:35:39 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> To confirm, I just found out that the string I am searching for is sometimes spread over 2 lines.</p>
<p dir="auto">i.e. ThisIsTheStringIAmSearchingFor  - this exact specific string - is normally on the same line.  But sometimes its like this:<br />
ThisIsTheStringIAmSearch<br />
ingFor</p>
<p dir="auto">I dont know where the line break may occur, or even if a line break does occur.  How do I make sure I find that string in the Find: box?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81508</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81508</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Tue, 15 Nov 2022 21:35:39 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 20:55:55 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> Actually sometimes the string I’m searching for <strong>is</strong> split up onto two lines.<br />
Can I use the .newline checkbox for that, or is there a better way of matching over a line break.</p>
<p dir="auto">e.g.  My_Stringabcdefghi<br />
jklm12345"<br />
needs to be matched</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81506</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81506</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Tue, 15 Nov 2022 20:55:55 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 20:13:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> said in <a href="/post/81498">Regex: How do I search for My_String [any characters] [quotation mark] ?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Ah, thanks… sorry about the formatting…<br />
I’m not sure what that means exactly in my context… Just the .* worked for me fine.</p>
</blockquote>
<p dir="auto">That means you didn’t have any lines with <code>My_String/Blah/Blah" and "more text here"</code>, because otherwise it would have grabbed too much in</p>
<blockquote>
<p dir="auto">That appears to work.  I looked up *?  “Zero or one of the last character.”</p>
</blockquote>
<p dir="auto">Actually, alone, <code>?</code> means “zero or one of the last character”, so if you had <code>a?</code> it would match zero or one <code>a</code>, and if you had <code>[a-z]?</code> it would match zero or one letter from a-z.</p>
<p dir="auto">But when used in conjunction with the asterisk, <code>*?</code> means "zero or more of whatever came before the <code>*?</code>, but as few as possible.  To quote the manual:<br />
<img src="/assets/uploads/files/1668543087213-c467b44d-56f8-4994-83e5-b94f2a90ee58-image.png" alt="c467b44d-56f8-4994-83e5-b94f2a90ee58-image.png" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">I don’t have the .newline checked.</p>
</blockquote>
<p dir="auto">Good.  I still try to put <code>(?-s)</code> in such regex, because I cannot know what your checkbox is, and cannot know that you will remember to verify the checkbox some days later when you try it again.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81500</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81500</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 15 Nov 2022 20:13:01 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 20:05: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> Ah, thanks… sorry about the formatting…<br />
That appears to work.  I looked up *?  “Zero or one of the last character.”   I’m not sure what that means exactly in my context… Just the .* worked for me fine.<br />
I don’t have the .newline checked.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81498</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81498</guid><dc:creator><![CDATA[IanSunlun]]></dc:creator><pubDate>Tue, 15 Nov 2022 20:05:36 GMT</pubDate></item><item><title><![CDATA[Reply to Regex: How do I search for My_String [any characters] [quotation mark] ? on Tue, 15 Nov 2022 19:58:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iansunlun" aria-label="Profile: IanSunlun">@<bdi>IanSunlun</bdi></a> ,</p>
<p dir="auto">Because you did not use the formatting toolbar when entering your post, and didn’t follow the advice given in the FAQ section about how to ask search/replace questions and format those so that all your characters come through, your data does not come through correctly.</p>
<p dir="auto">But based on your problem statement, FIND = <code>My_String(.*)"</code> , REPLACE = <code>My_string${1}.mhtml"</code> should work, as long as you have SEARCH MODE = Regular Expression selected.</p>
<p dir="auto"><em>edit</em>: Actually, I would recommend <code>My_String(.*?)"</code> to avoid matching too far.  And <code>(?-s)My_String(.*?)"</code> so that I don’t have to tell you to not have <code>. matches newline</code> checkmarked.</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://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/81496</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81496</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 15 Nov 2022 19:58:52 GMT</pubDate></item></channel></rss>