<?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[Replace all occurrences of a character between 2 words]]></title><description><![CDATA[<p dir="auto">I need to remove all [ and ] characters that occur between INSERT INTO and VALUES, but keep the remaining text and also don’t delete these characters that occur outside the 2 words. So select all text that starts with INSERT INTO and end with VALUES and remove [ and ] from only that text. Example:</p>
<p dir="auto">FROM</p>
<p dir="auto">INSERT INTO [emp1] ([id], [name], [age], [address])<br />
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;<br />
INSERT INTO [emp2] ([id], [name], [age], [address])<br />
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;<br />
INSERT INTO [emp3] ([id], [name], [age], [address])<br />
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;</p>
<p dir="auto">TO</p>
<p dir="auto">INSERT INTO emp1 (id, name, age, address)<br />
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;<br />
INSERT INTO emp2 (id, name, age, address)<br />
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;<br />
INSERT INTO emp3 (id, name, age, address)<br />
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20803/replace-all-occurrences-of-a-character-between-2-words</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 03:15:20 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20803.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Feb 2021 20:01:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Mon, 01 Mar 2021 12:51:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> said in <a href="/post/63359">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">Indeed, as meta-characters, the [ and ] must be escaped with the \ symbol to search them as literal symbols. But the [ syntax has also a special meaning, with the NodeBB Markdown language !</p>
</blockquote>
<p dir="auto">Given these problems (that we usually initially forget when posting), I may consider going with this substitution instead, for any future regexes I post containing the dreaded backslash-bracket situation:</p>
<p dir="auto">for backslash-open-square-bracket: <code>\x5B</code><br />
for backslash-close-square-bracket: <code>\x5D</code></p>
<p dir="auto">Or…maybe not.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63409</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63409</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 01 Mar 2021 12:51:40 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Mon, 01 Mar 2021 04:23:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello,<a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a><br />
Please try this code, To Replace all occurrences of a character between 2 words.<br />
RegEx:</p>
<pre><code>/(?:\G(?!^)|string1)(?:(?!string1|string2).)*?\K\h(?=.*string2)/gm
</code></pre>
<p dir="auto">I hope this RegEx will be useful to you.<br />
Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63397</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63397</guid><dc:creator><![CDATA[prahladmifour]]></dc:creator><pubDate>Mon, 01 Mar 2021 04:23:46 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Sat, 27 Feb 2021 13:36:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a> and <strong>All</strong>,</p>
<p dir="auto">Due some <strong><code>Markdown</code></strong> syntax <strong>problems</strong>, when typing the <strong>square braket</strong> characters, most of the <strong>regexes</strong>, in my <strong>previous</strong> post, could <strong>not</strong> work :-(.</p>
<p dir="auto">Indeed, as <strong>meta-characters</strong>, the <strong><code>[</code></strong> and <strong><code>]</code></strong> must be <strong>escaped</strong> with the <strong><code>\</code></strong> symbol to search them as <strong>literal</strong> symbols. But the <strong><code>\\[</code></strong> syntax has also a <strong>special</strong> meaning, with the <strong>NodeBB</strong> <strong><code>Markdown</code></strong> language !</p>
<p dir="auto">Fortunately, as <strong>administrator</strong>, I was able to <strong>correct</strong> them. Thus, any test with the <strong>new</strong> regexes, above, should work <strong>nicely</strong> !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63359</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63359</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 27 Feb 2021 13:36:25 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Sat, 27 Feb 2021 13:21:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@alan-kilborn</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18057">@astrosofista</a> and <strong>All</strong>,</p>
<p dir="auto">As you <strong>chat</strong> with me, asking for some <strong>help</strong>, once again, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a>, I’m going to describe this <strong>generic</strong> regex !</p>
<hr />
<ul>
<li>
<p dir="auto">Let <strong>FR</strong> (<strong><code>Find Regex</code></strong> ) be the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> to be searched</p>
</li>
<li>
<p dir="auto">Let <strong>RR</strong> (<strong><code>Replacement Regex</code></strong> ) be the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> which must replace the <strong>FR</strong> expression</p>
</li>
<li>
<p dir="auto">Let <strong>BSR</strong> ( <strong><code>Begin Search-region Regex</code></strong> ) be the regex which defines the <strong>beginning</strong> of the area where the search for <strong>FR</strong>, must <strong>start</strong></p>
</li>
<li>
<p dir="auto">Let <strong>ESR</strong> ( <strong><code>End Search-region Regex</code></strong>) be the regex which defines, <strong>implicitly</strong>, the area where the search for <strong>FR</strong>, must <strong>end</strong></p>
</li>
</ul>
<p dir="auto">I assume some <strong>important</strong> hypotheses :</p>
<ul>
<li>
<p dir="auto">The <strong><code>Wrap around</code></strong> option must be <strong>ticked</strong></p>
</li>
<li>
<p dir="auto">The <strong>caret</strong> must be moved at the <strong>very beginning</strong> of your file, ( case of a click on the <strong><code>Find Next</code></strong>, <strong><code>Count</code></strong>, <strong><code>Replace</code></strong> or <strong><code>Reaplce All</code></strong> button )</p>
</li>
</ul>
<p dir="auto">Then, the <strong>generic</strong> regex, below, searches for <strong>any</strong> occurrence of <strong>FR</strong>, in the <strong>multi</strong>-lines range, between the <strong>BSR</strong> and <strong>ESR</strong> boundaries and <strong>replaces</strong> each occurrence of <strong>FR</strong> with <strong>RR</strong> :</p>
<p dir="auto">SEARCH <strong><code>(?-i:</code>BSR<code>|(?!\A)\G)(?s:(?!</code>ESR<code>).)*?\K(?-i:</code>FR<code>)</code></strong></p>
<p dir="auto">REPLACE <strong>RR</strong></p>
<hr />
<p dir="auto">But, of course, we must <strong>interpret</strong>, according to your <strong>context</strong> !</p>
<p dir="auto">In your <strong>last</strong> post, you show us this regex :</p>
<p dir="auto"><strong><code>(?-i:INSERT INTO|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:\\[)</code></strong></p>
<p dir="auto">Seemingly, you want to <strong>delete</strong> any <strong><code>[</code></strong> or <strong><code>]</code></strong> chars, found in lines containing the <strong><code>INSERT INTO</code></strong> string till the <strong>end</strong> of <strong>current</strong> line, as the <strong>next</strong> one is a <strong>forbidden</strong> line, containing the string <strong><code>VALUES</code></strong></p>
<p dir="auto">In this <strong>specific</strong> case, you do <strong>not</strong> need at all the <strong>negative look-ahead</strong> structure <strong><code>(?!VALUES)</code></strong>. Indeed, we just have to <strong>suppose</strong> that the <strong>range</strong> of chars from <strong>BSR</strong> till a <strong><code>[</code></strong> or <strong><code>]</code></strong> char, are <strong>standard</strong> characters, different from <strong><code>\r</code></strong> and <strong><code>\n</code></strong>. Thus, <strong>implicitly</strong>, the <strong>end</strong> of that range comes right <strong>before</strong> the <strong>line-endings</strong> chars of <strong>current</strong> line !</p>
<p dir="auto">So your regex can be rewritten as :</p>
<p dir="auto"><strong><code>(?-i:INSERT INTO|(?!\A)\G)(?-s:.)*?\K(?-i:\\[)</code></strong></p>
<p dir="auto">But as we don’t need a <strong>group</strong> in <strong><code>(?-s:.)*?</code></strong>, which can be expressed as <strong><code>.*?</code></strong> and we can <strong>report</strong> the <strong><code>(?-s)</code></strong> modifier along with the <strong><code>(?-i)</code></strong> modifier, at <strong>beginning</strong> of the regex, giving :</p>
<p dir="auto"><strong><code>(?-si:INSERT INTO|(?!\A)\G).*?\K(?-i:\\[)</code></strong></p>
<p dir="auto">Now, the <strong><code>-i</code></strong> modifier in <strong><code>(?-i:\\[)</code></strong> is <strong>useless</strong> as a <strong><code>[</code></strong> char is not a <strong>letter</strong>, and, moreover, you forgot to add the <strong><code>]</code></strong> char. So the <strong>final</strong> regex S/R can be expressed as :</p>
<p dir="auto">SEARCH <strong><code>(?-si:INSERT\x20INTO|(?!\A)\G).*?\K(?:\\[|\\])</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">With you <strong>initial</strong> sample :</p>
<pre><code class="language-diff">INSERT INTO [emp1] ([id], [name], [age], [address])
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO [emp2] ([id], [name], [age], [address])
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;
INSERT INTO [emp3] ([id], [name], [age], [address])
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<p dir="auto">we get the <strong>expected</strong> text :</p>
<pre><code class="language-diff">INSERT INTO emp1 (id, name, age, address)
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO emp2 (id, name, age, address)
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;
INSERT INTO emp3 (id, name, age, address)
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<hr />
<p dir="auto">Now, if your <strong><code>NSERT INTO</code></strong> line may continue on <strong>several</strong> lines, <strong>before</strong> a <strong><code>VALUES</code></strong> line, which, itself, may be splitted in <strong>several</strong> lines, the solution is very <strong>close</strong> to the <strong>generic</strong> regex  and to your regex, either !</p>
<p dir="auto">SEARCH <strong><code>(?-i:INSERT\x20INTO|(?!\A)\G)(?s:(?!VALUES).)*?\K(?:\\[|\\])</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">Then, from this text :</p>
<pre><code class="language-diff">INSERT INTO [emp1]
 ([id], [name],
 [age], [address])
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO [emp2] ([id],
 [name], [age],
 [address])
VALUES (2, ‘jim’,
 21, ‘123 dow]ning
 street’) ;
INSERT INTO
 [emp3] ([id], [name], [age], [address])VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<p dir="auto">We get this <strong>correct</strong> output text :</p>
<pre><code class="language-diff">INSERT INTO emp1
 (id, name,
 age, address)
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO emp2 (id,
 name, age,
 address)
VALUES (2, ‘jim’,
 21, ‘123 dow]ning
 street’) ;
INSERT INTO
 emp3 (id, name, age, address)VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<hr />
<p dir="auto">If some <strong>issues</strong> occur on <strong>large</strong> <strong><code>SQL</code></strong> files, this means that :</p>
<ul>
<li>Your samples do <strong>not</strong> clearly represent your <strong>real</strong> data</li>
</ul>
<p dir="auto">and/or</p>
<ul>
<li>The <strong>search</strong> regex is <strong>not</strong> restrictive enough, in order to <strong>avoid</strong> some cases !</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63334</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63334</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 27 Feb 2021 13:21:36 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 21:19:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63314">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18057">@astrosofista</a></p>
<p dir="auto">WHY would you do that?<br />
We need to point posters to generic solutions.<br />
Not reinvent the wheel each time.<br />
:-(</p>
</blockquote>
<p dir="auto">I think you answered your question yourself, when you wrote “There can be more than one solution to a problem, certainly.”</p>
<p dir="auto">It isn’t my purpose to reinvet the wheel each time. I take it as a kind of mental gymnastics — you know, Alzheimer is waiting us :( —, always with the aim of helping people and learning new ways of doing things at the same time.</p>
<p dir="auto">And sometimes I get both.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63329</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63329</guid><dc:creator><![CDATA[astrosofista]]></dc:creator><pubDate>Fri, 26 Feb 2021 21:19:04 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 21:17:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63326">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">Yea, like I said, backslash before <code>[</code> or <code>]</code> on this site is crazy hard to remember how to express.</p>
<p dir="auto">Well, the good part is that it is solved for you.<br />
And that satisfying clunk of that new tool as you drop it into your toolbox.</p>
<p dir="auto">Thank you for being a “smart” regex questioner, willing to learn something – it is refreshing!  :-)</p>
</blockquote>
<p dir="auto">God, its odd. I just undid the change, reused my 2 originals separately and it works. I have no idea why it did that funky stuff before. I’m sure its something I did (2.45am here in India).</p>
<p dir="auto">Thank you for patiently answering sir, much appreciated 🙏</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63328</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63328</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 21:17:25 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 21:12:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">Yea, like I said, backslash before <code>[</code> or <code>]</code> on this site is crazy hard to remember how to express.</p>
<p dir="auto">Well, the good part is that it is solved for you.<br />
And that satisfying clunk of that new tool as you drop it into your toolbox.</p>
<p dir="auto">Thank you for being a “smart” regex questioner, willing to learn something – it is refreshing!  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63326</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63326</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 21:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 21:09:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63324">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">(?-i:INSERT INTO|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:[|])</p>
</blockquote>
<p dir="auto">That worked perfectly. Possibly some backslash difference.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63325</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63325</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 21:09:34 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:59:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<blockquote>
<p dir="auto">I tried it on a large SQL file and it takes out [ even before the first ever INSERT INTO occurrence.</p>
</blockquote>
<p dir="auto">Hmm, I don’t see that behavior.</p>
<p dir="auto">If I take your example, and copy one of its lines before any “INSERT INTO”… :</p>
<pre><code class="language-z">VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO [emp1] ([id], [name], [age], [address])
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO [emp2] ([id], [name], [age], [address])
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;
INSERT INTO [emp3] ([id], [name], [age], [address])
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<p dir="auto">And I use this:</p>
<pre><code>(?-i:INSERT INTO|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:\\[|\\])
</code></pre>
<p dir="auto">I obtain:</p>
<pre><code class="language-z">VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO emp1 (id, name, age, address)
VALUES (1, ‘john’, 23, ‘123 ad[ams street’) ;
INSERT INTO emp2 (id, name, age, address)
VALUES (2, ‘jim’, 21, ‘123 dow]ning street’) ;
INSERT INTO emp3 (id, name, age, address)
VALUES (3, ‘jack’, 20, ‘123 pa][rk street’) ;
</code></pre>
<p dir="auto">Possible things I could be doing differently:</p>
<ul>
<li>I have <em>Wrap around</em> ticked</li>
<li>I press the <em>Replace All</em> button</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/63324</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63324</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:59:32 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:53:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63319">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a> said in <a href="/post/63318">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">And thank you for giving a template and not a direct solution, had to use a couple neurons</p>
</blockquote>
<p dir="auto">Yes, but it felt good, I’m sure!<br />
And…you have a “tool” for next time you need to replace only within a delimited range!</p>
<p dir="auto">Teach a man to fish…</p>
</blockquote>
<p dir="auto">Okay, so I tried it on a large SQL file and it takes out [ even before the first ever INSERT INTO occurrence.</p>
<p dir="auto">What I used in search</p>
<pre><code>(?-i:INSERT INTO|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:\\[)
</code></pre>
<p dir="auto">It replaced it in “SET IDENTITY_INSERT [db].[emp1] OFF;” for example which came before the INSERT INTO [emp1]</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63323</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63323</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:53:50 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:39:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a> said in <a href="/post/63318">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">And thank you for giving a template and not a direct solution, had to use a couple neurons</p>
</blockquote>
<p dir="auto">Yes, but it felt good, I’m sure!<br />
And…you have a “tool” for next time you need to replace only within a delimited range!</p>
<p dir="auto">Teach a man to fish…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63319</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63319</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:39:51 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:38:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63317">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">There can be more than one solution to a problem, certainly.<br />
You probably had it with where I had sent you, but it is hard to tell because this site gobbles up a backslash used before a <code>[</code>.</p>
</blockquote>
<p dir="auto">Got it. It looks like it works though. And thank you for giving a template and not a direct solution, had to use a couple neurons :D</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63318</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63318</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:38:11 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:35:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">There can be more than one solution to a problem, certainly.<br />
You probably had it with where I had sent you, but it is hard to tell because this site gobbles up a backslash used before a <code>[</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63317</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63317</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:33:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63314">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18057">@astrosofista</a></p>
<p dir="auto">WHY would you do that?<br />
We need to point posters to generic solutions.<br />
Not reinvent the wheel each time.<br />
:-(</p>
</blockquote>
<p dir="auto">I did give it a try and found a solution though :D</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63316</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63316</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:32:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18057">@astrosofista</a> said in <a href="/post/63312">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">As long as example data is representative of the job, the following regex will accomplish it. It takes a different approach than <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a>’s suggestion</p>
<p dir="auto">Search:		(?-s)(?&lt;=VALUES )(.+)|\[|\]<br />
Replace:	$1</p>
<pre><code class="language-z">Search: (?-s)(?&lt;=VALUES )(.+)|\[|\]
Replace: $1
</code></pre>
<p dir="auto">Put the caret at the very beginning of the document, select the <code>Regular Expression mode</code> and click on <code>Replace All</code>.</p>
<p dir="auto">Take care and have fun!</p>
</blockquote>
<p dir="auto">Thank you kind sir, this worked too :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63315</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63315</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:32:15 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:31:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18057">@astrosofista</a></p>
<p dir="auto">WHY would you do that?<br />
We need to point posters to generic solutions.<br />
Not reinvent the wheel each time.<br />
:-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63314</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63314</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:31:56 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:30:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/63311">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a> said in <a href="/post/63310">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">Thanks Alan, going to try that now.</p>
</blockquote>
<p dir="auto">Let us know if you have trouble.<br />
I tried it on your data and it seemed to work perfectly for your need.<br />
Remember that you want to be in “Regular expression” Search Mode.</p>
</blockquote>
<p dir="auto">Took me a min but I’m guessing its the below, right?</p>
<p dir="auto">for [ - (?-i:INSERT|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:[)</p>
<p dir="auto">for ] - (?-i:INSERT|(?!\A)\G)(?s:(?!VALUES).)*?\K(?-i:])</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63313</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63313</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:30:54 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:32:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">As long as example data is representative of the job, the following regex will accomplish it. It takes a different approach than <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a>’s suggestion</p>
<pre><code class="language-z">Search: (?-s)(?&lt;=VALUES )(.+)|\[|\]
Replace: $1
</code></pre>
<p dir="auto">Put the caret at the very beginning of the document, select the <code>Regular Expression mode</code> and click on <code>Replace All</code>.</p>
<p dir="auto">Take care and have fun!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63312</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63312</guid><dc:creator><![CDATA[astrosofista]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:32:06 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:17:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a> said in <a href="/post/63310">Replace all occurrences of a character between 2 words</a>:</p>
<blockquote>
<p dir="auto">Thanks Alan, going to try that now.</p>
</blockquote>
<p dir="auto">Let us know if you have trouble.<br />
I tried it on your data and it seemed to work perfectly for your need.<br />
Remember that you want to be in “Regular expression” Search Mode.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63311</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63311</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:17:11 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:15:06 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Alan, going to try that now.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63310</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63310</guid><dc:creator><![CDATA[vamshi reddy 0]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to Replace all occurrences of a character between 2 words on Fri, 26 Feb 2021 20:11:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/21321">@vamshi-reddy-0</a></p>
<p dir="auto">It seems like a perfect chance to use the general regex replacement instructions for such a task found <a href="https://community.notepad-plus-plus.org/post/62799">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63309</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63309</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 26 Feb 2021 20:11:07 GMT</pubDate></item></channel></rss>