<?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: step by step]]></title><description><![CDATA[<p dir="auto">before:<br />
a cd eg g h ik<br />
it should look like this:<br />
<strong>A</strong> <strong>C</strong>d <strong>E</strong>g <strong>G</strong> <strong>H</strong> <strong>I</strong>k</p>
<p dir="auto">I want to do it step by step (Replace)<br />
1 <strong>A</strong> cd eg g h ik<br />
2 <strong>A</strong> <strong>C</strong>d eg g h ik<br />
3 <strong>A</strong> <strong>C</strong>d <strong>E</strong>g g h ik<br />
4 <strong>A</strong> <strong>C</strong>d <strong>E</strong>g <strong>G</strong> h ik<br />
5 <strong>A</strong> <strong>C</strong>d <strong>E</strong>g <strong>G</strong> <strong>H</strong> ik<br />
6 <strong>A</strong> <strong>C</strong>d <strong>E</strong>g <strong>G</strong> <strong>H</strong> <strong>I</strong>k</p>
<p dir="auto">step by step: it works<br />
a cd eg g h ik<br />
<code>(?&lt;=^)(.)</code><br />
<code>\u$0</code><br />
<strong>A</strong> cd eg g h ik</p>
<p dir="auto">step by step: does not work<br />
a cd eg g h ik<br />
<code>(?&lt;=\s)(.)</code><br />
<code>\u$0</code><br />
a cd eg g h ik</p>
<p dir="auto">Where is the mistake?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19793/regex-step-by-step</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 19:25:21 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19793.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Aug 2020 06:33:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 20:01:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> said in <a href="/post/56406">RegEx: step by step</a>:</p>
<blockquote>
<p dir="auto">I’m not entirely happy with the replacement field, for 2 reasons.</p>
</blockquote>
<p dir="auto">Now that I’ve had a bit more time to look at the question my final regex is:<br />
Find What:<code>\w+</code><br />
Replace With:<code>\u$0</code></p>
<p dir="auto">As the <code>\u</code> will ONLY convert the first character of anything following it to upper case we don’t need to worry that $0 actually contains the entire “word”, not JUST the first character.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56430</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56430</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 03 Aug 2020 20:01:02 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 11:55:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pan-jan" aria-label="Profile: Pan-Jan">@<bdi>Pan-Jan</bdi></a> said in <a href="/post/56409">RegEx: step by step</a>:</p>
<blockquote>
<p dir="auto">I can answer in 20 minutes.</p>
</blockquote>
<p dir="auto">You have to get a reputation score of 2+ before the 20 minute thing is removed for your account.<br />
With the quality of your postings, I wish you good luck with that.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56413</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56413</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 03 Aug 2020 11:55:50 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 10:12:25 GMT]]></title><description><![CDATA[<p dir="auto">I already know.<br />
(?&lt;=<code>^</code>A.+M)XYZ are forbidden</p>
<p dir="auto">I can answer in 20 minutes.<br />
It’s not very smart and editing before 3 minutes too</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56409</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56409</guid><dc:creator><![CDATA[Thomas 2020]]></dc:creator><pubDate>Mon, 03 Aug 2020 10:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 10:05:53 GMT]]></title><description><![CDATA[<p dir="auto">I don’t think that is a bug. I believe it’s the issue I mentioned. Your look behind is NOT a fixed width. The ^ is a zero width “character”, start of line. The “e” is 1 character wide. That probably makes the regex invalid.</p>
<p dir="auto">My regex solution definitely isn’t great. It was made in a hurry to test my idea. There is bound to be a much better solution for your example.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56408</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56408</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 03 Aug 2020 10:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 09:31:51 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, big U … gets the job done<br />
uppercase<br />
\u =	[[:upper:]]<br />
\U =	[^[:upper:]]</p>
<p dir="auto"><img src="/assets/uploads/files/1596447028676-schowek00a.jpg" alt="Schowek00a.jpg" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1596447044382-schowek00b.jpg" alt="Schowek00b.jpg" class=" img-fluid img-markdown" /><br />
Why is there a bug here?<br />
<img src="/assets/uploads/files/1596447088701-schowek01.jpg" alt="Schowek01.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/56407</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56407</guid><dc:creator><![CDATA[Thomas 2020]]></dc:creator><pubDate>Mon, 03 Aug 2020 09:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx: step by step on Mon, 03 Aug 2020 08:18:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pan-jan" aria-label="Profile: Pan-Jan">@<bdi>Pan-Jan</bdi></a> said in <a href="/post/56405">RegEx: step by step</a>:</p>
<blockquote>
<p dir="auto">I want to do it step by step (Replace)</p>
</blockquote>
<p dir="auto">Firstly, use of the look behind can be problematic as you have seen. <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> had a recent post explaining it in some detail. Have a look at<br />
<a href="https://community.notepad-plus-plus.org/topic/19006/regex-positive-look-behind-with/6">https://community.notepad-plus-plus.org/topic/19006/regex-positive-look-behind-with/6</a><br />
and maybe you can see the reason why. Otherwise since I’ve referred to <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>, he may well pop his head in and explain again. From my perspective the look-behind is constrained by a fixed width, thus where ever the cursor is your look-behind ONLY looks back 1 character. It’s also explained at:<br />
<a href="https://www.rexegg.com/regex-disambiguation.html" rel="nofollow ugc">https://www.rexegg.com/regex-disambiguation.html</a></p>
<p dir="auto">I looked at a different idea and my Replace function regex is:<br />
Find What:<code>(^|\s).</code><br />
Replace With:<code>\U$0\E</code></p>
<p dir="auto">I’m not entirely happy with the replacement field, for 2 reasons. Firstly it does attempt to convert the zero width “start of line” or the space to uppercase. Of course that doesn’t cause an issue but I feel it’s bad programming. Secondly it didn’t work with the <code>\u</code> modifier (which is only for a single character), thus I used the <code>\U</code> and <code>\E</code> as replacements. In saying that, it does work in the single step replacement which is your original issue.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56406</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56406</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 03 Aug 2020 08:18:40 GMT</pubDate></item></channel></rss>