<?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[Find/Replace text string in multiple files using criteria from a Look-up Table?]]></title><description><![CDATA[<p dir="auto">I have thousands of .txt files, and among hundreds of lines of text each file also contains an alphanumeric string that is a Unique Identifying Number preceded by a code denoting the line as containing the UID (e.g., UID. 12-345-67891).</p>
<p dir="auto">Is it possible to run a batch Find/Replace across all of the files to change the format of the UID (to 12345678910000) using a look-up table?</p>
<p dir="auto">I have only used NPP for basic functions such as Find/Replace in Files, but I do have some familiarity with Python Script.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16953/find-replace-text-string-in-multiple-files-using-criteria-from-a-look-up-table</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 14:07:54 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16953.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Jan 2019 15:51:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 21:42:36 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> Thanks for the suggestion. Considering that the solution from <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> worked and was much easier, I may try this one at a later time. Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/38553</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38553</guid><dc:creator><![CDATA[Trey Hargrove]]></dc:creator><pubDate>Tue, 15 Jan 2019 21:42:36 GMT</pubDate></item><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 20:35:31 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> This worked perfectly, with no need for a look-up table. Thank you so much.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/38551</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38551</guid><dc:creator><![CDATA[Trey Hargrove]]></dc:creator><pubDate>Tue, 15 Jan 2019 20:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 18:43:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/trey-hargrove" aria-label="Profile: Trey-Hargrove">@<bdi>Trey-Hargrove</bdi></a> said:</p>
<blockquote>
<p dir="auto">but I do have some familiarity with Python Script.</p>
</blockquote>
<p dir="auto">Due to that, Maybe the script here is of some interest as a starting point if the other approach gets too burdensome:  <a href="https://notepad-plus-plus.org/community/topic/16942/pythonscript-any-ready-pyscript-to-replace-one-huge-set-of-regex-phrases-with-others" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/16942/pythonscript-any-ready-pyscript-to-replace-one-huge-set-of-regex-phrases-with-others</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/38542</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38542</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 15 Jan 2019 18:43:41 GMT</pubDate></item><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 18:08:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/trey-hargrove" aria-label="Profile: Trey-Hargrove">@<bdi>Trey-Hargrove</bdi></a> ,</p>
<p dir="auto">Based on your description, my regular expression solution should work for you.  Does it?</p>
<p dir="auto"><strong>edit</strong>: you should probably try on a single file first (backing up the file before trying) before trying with the FindInFiles</p>
]]></description><link>https://community.notepad-plus-plus.org/post/38540</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38540</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 15 Jan 2019 18:08:25 GMT</pubDate></item><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 17:57:54 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> Thanks for the quick response. The reason I only gave one example is because all of the UIDs are in the same format (##-###-####), but I want to convert them into a new format (##########0000).</p>
<p dir="auto">The reason I am asking about using a look-up table is because I have THOUSANDS of files to go through, and each one contains a totally different UID, hence the Unique in Unique ID. If the exact same UID was present in each file, then I would just use Find(/Replace) In Files to search them all for that one specific UID and replace it in bulk. Since there are thousands of entries to make, using Find(/Replace) In Files I would have to enter a new value manually for each file, and repeat thousands of times.  Its easy for me to generate a look-up table containing the UIDs in their existing format in one column and the desired format in another column. The difficulty is finding the software that can read that table and make the thousands of individual changes in bulk. I’m hoping NPP can do it. If not, I may have to go with a PowerShell script.</p>
<p dir="auto">Does that clarify?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/38539</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38539</guid><dc:creator><![CDATA[Trey Hargrove]]></dc:creator><pubDate>Tue, 15 Jan 2019 17:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Find/Replace text string in multiple files using criteria from a Look-up Table? on Tue, 15 Jan 2019 16:25:33 GMT]]></title><description><![CDATA[<p dir="auto">Using a lookup table?  <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> or <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> would know better than I – they are great at doing two-file merges and the like, so I’m sure that could fit your “lookup table” description.</p>
<p dir="auto">But if really what you want is “two digits, hyphen, three digits, hyphen, five digits” converted to “those two, those three, those five, four zeroes” (it’s impossible to know, because you didn’t define your search/replace needs very well: a single instance is almost never enough to determine what you really want, though it can make for some entertaining guesses on our part).</p>
<p dir="auto">(<strong>edit</strong> make sure to use <strong>Find in Files</strong> dialog/tab, not just the <strong>Replace</strong>)</p>
<ul>
<li>data =</li>
</ul>
<pre><code class="language-z">12-345-67891
98-765-43219
55-555-55555
</code></pre>
<ul>
<li>find = <code>(\d{2})-(\d{3})-(\d{5})</code></li>
<li>replace = <code>${1}${2}${3}0000</code></li>
<li>search mode = regular expression</li>
<li>result =</li>
</ul>
<pre><code class="language-z">12345678910000
98765432190000
55555555550000
</code></pre>
<p dir="auto">If this isn’t what you want, you’ll have to give a better example.</p>
<p dir="auto">-----<br />
boilerplate</p>
<blockquote>
<p dir="auto">FYI: if you have further search-and-replace (regex) needs, study <a href="https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation" rel="nofollow ugc">this FAQ</a> and the documentation it points to. Before asking a new regex question, understand that for future requests, many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backward to get things working for you.  If you need help formatting the data so that the forum doesn’t mangle it (so that it shows “exactly”, as I said earlier), see <a href="https://notepad-plus-plus.org/community/topic/14262/how-to-markdown-code-on-this-forum/2" rel="nofollow ugc">this help-with-markdown post</a>, where <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> gives a great summary of how to use Markdown for this forum’s needs.<br />
Please note that for all “regex” queries – or queries where you want help “matching” or “marking” or “bookmarking”  a certain pattern, which amounts to the same thing – it is best if you are explicit about what needs to match, <em>and</em> what <em>shouldn’t</em> match, and have multiple examples of both in your example dataset.  Often, what <em>shouldn’t match</em> helps define the regular expression as much or more than what <em>should match</em>.</p>
</blockquote>
]]></description><link>https://community.notepad-plus-plus.org/post/38536</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/38536</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 15 Jan 2019 16:25:33 GMT</pubDate></item></channel></rss>