<?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 mask a list of emails?]]></title><description><![CDATA[<p dir="auto">Hey guys,</p>
<p dir="auto">In a list of emails (one per line), similar to this:</p>
<p dir="auto"><img src="/assets/uploads/files/1687162702349-screen-shot-2023-06-19-at-11.18.01-am.png" alt="Screen Shot 2023-06-19 at 11.18.01 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">How to use regex to mask the emails (for GDPR) by replacing every character between the first and last before @ with * ?</p>
<p dir="auto">So we get this:</p>
<p dir="auto"><img src="/assets/uploads/files/1687162732714-screen-shot-2023-06-19-at-11.18.04-am.png" alt="Screen Shot 2023-06-19 at 11.18.04 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Or alternatively, just insert a set number of asterisks (for example, 5) after the first character and @, like this:</p>
<p dir="auto"><img src="/assets/uploads/files/1687162740257-screen-shot-2023-06-19-at-11.18.07-am.png" alt="Screen Shot 2023-06-19 at 11.18.07 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I’ve been struggling with this the whole morning and got nowhere…</p>
<p dir="auto">Please help :(</p>
<p dir="auto">(images used because of Akismet marking the post as spam otheriwse)</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24594/regex-mask-a-list-of-emails</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 22:04:37 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24594.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Jun 2023 08:19:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regex mask a list of emails? on Mon, 19 Jun 2023 10:51:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/kraddock" aria-label="Profile: kraddock">@<bdi>kraddock</bdi></a> and <strong>All</strong>,</p>
<ul>
<li>
<p dir="auto">For your <strong>first</strong> goal, I propose this <strong>regex</strong> S/R :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?!^).(?=.*.@)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>*</code></strong></p>
</li>
</ul>
</li>
</ul>
<p dir="auto">And you end up with this <em>OUTPUT</em> text :</p>
<pre><code class="language-diff">e****1@gmail.com
s***********l@icould.com
t********l@yahoo.com
</code></pre>
<hr />
<ul>
<li>
<p dir="auto">For your <strong>second</strong> goal, I propose this <strong>regex</strong> S/R :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?!^).(?=.*@)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>*</code></strong></p>
</li>
</ul>
</li>
</ul>
<p dir="auto">And you end up with this <em>OUTPUT</em> text :</p>
<pre><code class="language-diff">e*****@gmail.com
s************@icould.com
t*********@yahoo.com
</code></pre>
<p dir="auto">For each case, check the <strong><code>Regular expression</code></strong> search  box !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87199</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87199</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 19 Jun 2023 10:51:50 GMT</pubDate></item></channel></rss>