<?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 replace for title casing]]></title><description><![CDATA[<p dir="auto">Fellow Notepad++ Users,</p>
<p dir="auto">Could you please help me the the following search-and-replace problem I am having?</p>
<p dir="auto">I have some words between an specific xml tagset that I need title cased. Ie first letter of each word uppercased. However, I want to do this through files and the amount of words between the specific tagset differs.</p>
<p dir="auto">Here is the data I currently have (“before” data):</p>
<pre><code>&lt;tag&gt; one two three &lt;/tag&gt;
&lt;tag&gt; one two three four &lt;/tag&gt;
</code></pre>
<p dir="auto">Here is how I would like that data to look (“after” data):</p>
<pre><code>&lt;tag&gt; One Two Three &lt;/tag&gt;
&lt;tag&gt; One Two Three Four &lt;/tag&gt;
</code></pre>
<p dir="auto">I know to do one word for title casing, you can use the expression:</p>
<ul>
<li>Find What = <code>\&lt;(\w+)</code></li>
<li>Replace With = <code>\L \u \1</code></li>
<li>Search Mode = REGULAR EXPRESSION</li>
</ul>
<p dir="auto">If it was a specific number of words I would just do capture groups but I’m not sure how to do multiple words at once if the amount of words is changing.</p>
<p dir="auto">Could i get some help on this please?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25721/search-replace-for-title-casing</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 17:03:10 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25721.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Apr 2024 16:09:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Search replace for title casing on Fri, 26 Apr 2024 18:57:28 GMT]]></title><description><![CDATA[<p dir="auto">Awesome thank yall for the help!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94506</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94506</guid><dc:creator><![CDATA[Acme1235]]></dc:creator><pubDate>Fri, 26 Apr 2024 18:57:28 GMT</pubDate></item><item><title><![CDATA[Reply to Search replace for title casing on Fri, 26 Apr 2024 18:37:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/acme1235" aria-label="Profile: Acme1235">@<bdi>Acme1235</bdi></a></p>
<p dir="auto">I can suggest an “unconventional” way to do this. It requires a plugin, <strong>Columns++</strong>, which you can install from <strong>Plugins</strong> | <strong>Plugins admin…</strong>.</p>
<p dir="auto">With no text selected, from the <strong>Columns++</strong> menu, select <strong>Search…</strong> and enter:</p>
<p dir="auto"><strong>Find what: <code>&lt;tag&gt;\K[^&lt;]++(?=&lt;/tag&gt;)</code></strong><br />
<strong>Search mode: Regular expression</strong></p>
<p dir="auto">in the dialog. Next, click the drop-down arrow at the right end of the <strong>Count</strong> button and choose <strong>Select All</strong> from the menu.</p>
<p dir="auto">Now close the dialog; then, from the main <strong>Notepad++</strong> menu, choose <strong>Edit</strong> | <strong>Convert Case to</strong> | <strong>Proper Case</strong>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94505</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94505</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Fri, 26 Apr 2024 18:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to Search replace for title casing on Fri, 26 Apr 2024 18:26:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/acme1235" aria-label="Profile: Acme1235">@<bdi>Acme1235</bdi></a> ,</p>
<p dir="auto">Thanks for following the search-replace-question-template.</p>
<p dir="auto">We have a <a href="/topic/22673">generic regex formula</a> for “<a href="/topic/22690">Replace in a Specific Zone of Text</a>”.  You want to do multiple replacements inside the zone of <code>&lt;tag&gt;</code> to <code>&lt;/tag&gt;</code>.  In the nomenclature of that recipe, <strong>BSR</strong> would be <code>&lt;tag&gt;</code>, <strong>ESR</strong> would be <code>&lt;/tag&gt;</code>, and your FIND WHAT and REPLACE WITH correspond to the <strong>FR</strong> and <strong>RR</strong> from the recipe.</p>
<p dir="auto">Putting it all together:</p>
<ul>
<li>FIND WHAT = <code>(?-si:&lt;tag&gt;|(?!\A)\G)(?s-i:(?!&lt;/tag&gt;).)*?\K(?-si:\&lt;(\w+))</code></li>
<li>REPLACE WITH = <code>\L\u\1</code></li>
<li>Search Mode = REGULAR EXPRESSION</li>
</ul>
<p dir="auto">I believe that should work (at least with your simple data</p>
<p dir="auto">(If the tags actually might have attributes, <code>&lt;tag[^&gt;]*&gt;</code> might be required)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94504</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94504</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 26 Apr 2024 18:26:48 GMT</pubDate></item></channel></rss>