<?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[Change location of the forward slash in every row containing 1 NAME]]></title><description><![CDATA[<p dir="auto">In a very large file I want to change the location of the forward slash to the beginning of the last word in the sentence for every row starting with “1 NAME”</p>
<p dir="auto">Example before<br />
1 NAME Hylkje /Eelkes Bouma/</p>
<p dir="auto">Example after<br />
1 NAME Hylkje Eelkes /Bouma/</p>
<p dir="auto">Can this be done with Notepad++</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21057/change-location-of-the-forward-slash-in-every-row-containing-1-name</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 10:46:30 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21057.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Apr 2021 15:22:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Change location of the forward slash in every row containing 1 NAME on Tue, 20 Apr 2021 19:21:37 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much!<br />
I used your last resolution: Find: <code>(?-s)^1 NAME.*\K/((?:\S+\h+))</code> and replace with <code> $1/</code><br />
it worked perfect!</p>
<p dir="auto">For people searching for this, i used it for batch editing a raw gedcom com familytree file.<br />
In older familytree software the firstname patronym and surname was noted differently so in a modern gedcom file the patronym would end op in the surname field.<br />
using notepad++ you can edit the raw gedcom file and with find and replace you can move the slash from the patronym to the surname.<br />
In this case it was a lifework from an old geneologist of 170.000 persons in a gedcom which was almost obsolete if this was not solved.<br />
Peter Jones thank you very much.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65190</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65190</guid><dc:creator><![CDATA[HVNF]]></dc:creator><pubDate>Tue, 20 Apr 2021 19:21:37 GMT</pubDate></item><item><title><![CDATA[Reply to Change location of the forward slash in every row containing 1 NAME on Tue, 20 Apr 2021 16:48:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hvnf" aria-label="Profile: HVNF">@<bdi>HVNF</bdi></a> said in <a href="/post/65177">Change location of the forward slash in every row containing 1 NAME</a>:</p>
<blockquote>
<p dir="auto">People with surnames with "van der"in front of it are missing the “van der” part.</p>
</blockquote>
<p dir="auto">There is no regular expression which magically can tell the difference between a multi-word name where the “last name” is just the last token and a multi-word name where the “last name” includes spaces like <code>van der Meer</code>.  You could try to add in exceptions into the single regex, but that’s fragile and hard to maintain.</p>
<p dir="auto">What I might do is start the process by doing a series of replacements like <code>van\x20der\x20</code> =&gt; <code>van☺der☺</code> for all your exceptions – using some non-space character like the smiley in the replacement (<code>\x20</code> is an alternate way of writing a space character in the search and replace expressions).  Then run the procedure I described.  Then change the ☺ back to a space.</p>
<p dir="auto">But if you really want the slash to just move forward one word instead of to the last word, then just get rid of the last + in the expression: <code>(?-s)^1 NAME.*\K/((?:\S+\h+))</code> – that way, it only looks to move one word and its spaces, rather than all the words and their spaces.</p>
<p dir="auto">If any of your names have middle names, then the move-forward-one-rule won’t work for you.</p>
<p dir="auto">Names are hard.  And regex aren’t the best tool for parsing names.  Good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65178</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65178</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 20 Apr 2021 16:48:25 GMT</pubDate></item><item><title><![CDATA[Reply to Change location of the forward slash in every row containing 1 NAME on Tue, 20 Apr 2021 16:37: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> said in <a href="/post/65175">Change location of the forward slash in every row containing 1 NAME</a>:</p>
<blockquote>
<p dir="auto">(?-s)^1 NAME.*\K/((?:\S+\h+)+)</p>
</blockquote>
<p dir="auto">Thank you very much for the fast reaction and it worked…<br />
But… in the result i see i did not asked the right question, my fault.<br />
People with surnames with "van der"in front of it are missing the “van der” part.</p>
<p dir="auto">Example<br />
1 NAME Janke /Pieters van der Meer/</p>
<p dir="auto">Became:<br />
1 NAME Janke Pieters van der /Meer/</p>
<p dir="auto">This should be:<br />
1 NAME Janke Pieters /van der Meer/</p>
<p dir="auto">So I should have asked for the question:<br />
Can the slash be moved to the beginning of the next word?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/65177</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65177</guid><dc:creator><![CDATA[HVNF]]></dc:creator><pubDate>Tue, 20 Apr 2021 16:37:39 GMT</pubDate></item><item><title><![CDATA[Reply to Change location of the forward slash in every row containing 1 NAME on Tue, 20 Apr 2021 15:46:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hvnf" aria-label="Profile: HVNF">@<bdi>HVNF</bdi></a> said in <a href="/post/65173">Change location of the forward slash in every row containing 1 NAME</a>:</p>
<blockquote>
<p dir="auto">Can this be done with Notepad++</p>
</blockquote>
<p dir="auto">Yes.</p>
<p dir="auto">One such way would be</p>
<ul>
<li>FIND = <code>(?-s)^1 NAME.*\K/((?:\S+\h+)+)</code></li>
<li>REPLACE = <code>$1/</code></li>
<li>Search Mode = Regular Expression</li>
</ul>
<p dir="auto">This looks for lines starting with <code>1 NAME</code> followed by something, followed by / and one or more words-then-spaces.  It uses a regex trick <code>\K</code> to “reset” the match so we don’t have to grab the first part of the line into memory.  It puts the words+spaces into group1 memory.  The replacement then puts group 1 <em>before</em> the slash instead of after.</p>
<p dir="auto">There are lots of other ways to do it.  And depending on other data, and how accurately your samples represented your whole, this may-or-may-not work out-of-the-box.</p>
<p dir="auto">Good luck.</p>
<p dir="auto">-—</p>
<p dir="auto"><em>Do you want regex search/replace help?  Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you.  All example text should be marked as literal text using the <code>&lt;/&gt;</code> toolbar button or manual <a href="https://community.notepad-plus-plus.org/topic/14262/how-to-markdown-code-on-this-forum/4">Markdown syntax</a>. To make <code>regex in red</code> (and so they keep their special characters like *), use backticks, like <code>`^.*?blah.*?\z`</code>. Screenshots can be pasted from the clipboard to your post using <code>Ctrl+V</code> to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have <strong>and</strong> the text you want to get from that data; include examples of things that <strong>should match</strong> and be transformed, <strong>and</strong> things that <strong>don’t match</strong> and should be left alone; show <strong>edge cases</strong> and make sure you examples are as <strong>varied</strong> as your real data.  Show the regex you already tried, <strong>and why</strong> you thought it should work; tell us what’s wrong with what you <strong>do</strong> get. Read the official <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">NPP Searching / Regex docs</a> and the forum’s <a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation">Regular Expression FAQ</a>. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/65175</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/65175</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 20 Apr 2021 15:46:07 GMT</pubDate></item></channel></rss>