How do I change two letters closest to a string and one letter immediately after a string using Notepad++?Delete all text before and after a certain stringNotepad++. How to replace different characters with corresponding letters at once?How can you change the zoom shortcut keys in Notepad++?remove a string of information after the 9th digit and before a string of set numbers that start with 31117Erase unknown string between two known strings in Notepad++how to delete all lines containing less than 3 letters before “ : ” in notepad++How to remove lines containing less than 3 letters in Email Before “@”domain in notepad++Notepad++ find and replace within a constant stringNotepad++ search and replace string with another string from the same lineHow to remove lines that not containing any uppercase letters or lowercase letters or numbers notepad++
A diagram about partial derivatives of f(x,y)
gcc: how to detect bad `bool` usage
How to plot polar formed complex numbers?
Professor being mistaken for a grad student
Did Ender ever learn that he killed Stilson and/or Bonzo?
PTIJ: Who should I vote for? (21st Knesset Edition)
Have researchers managed to "reverse time"? If so, what does that mean for physics?
What is the adequate fee for a reveal operation?
Recruiter wants very extensive technical details about all of my previous work
Knife as defense against stray dogs
I am confused as to how the inverse of a certain function is found.
How to deal with taxi scam when on vacation?
Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible
"of which" is correct here?
Experimental tests of Schrodinger evolution, position distribution, in square well and other simple systems?
Welcoming 2019 Pi day: How to draw the letter π?
Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?
Adventure Game (text based) in C++
Do I need life insurance if I can cover my own funeral costs?
et qui - how do you really understand that kind of phraseology?
How to terminate ping <dest> &
Min function accepting varying number of arguments in C++17
Life insurance that covers only simultaneous/dual deaths
Are ETF trackers fundamentally better than individual stocks?
How do I change two letters closest to a string and one letter immediately after a string using Notepad++?
Delete all text before and after a certain stringNotepad++. How to replace different characters with corresponding letters at once?How can you change the zoom shortcut keys in Notepad++?remove a string of information after the 9th digit and before a string of set numbers that start with 31117Erase unknown string between two known strings in Notepad++how to delete all lines containing less than 3 letters before “ : ” in notepad++How to remove lines containing less than 3 letters in Email Before “@”domain in notepad++Notepad++ find and replace within a constant stringNotepad++ search and replace string with another string from the same lineHow to remove lines that not containing any uppercase letters or lowercase letters or numbers notepad++
I have a list of emails, and I want to change the two letters before "@" and the first letter after "@" using Notepad++.
For example:
username@yourdomain.com
becomes
userna**@*ourdomain.com
notepad++
New contributor
add a comment |
I have a list of emails, and I want to change the two letters before "@" and the first letter after "@" using Notepad++.
For example:
username@yourdomain.com
becomes
userna**@*ourdomain.com
notepad++
New contributor
9
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
3
@WELZ Yes but its more work, a half working sample would(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string:1***@2***3
- uses a fixed number of mask characters but this is actually good.
– eckes
yesterday
add a comment |
I have a list of emails, and I want to change the two letters before "@" and the first letter after "@" using Notepad++.
For example:
username@yourdomain.com
becomes
userna**@*ourdomain.com
notepad++
New contributor
I have a list of emails, and I want to change the two letters before "@" and the first letter after "@" using Notepad++.
For example:
username@yourdomain.com
becomes
userna**@*ourdomain.com
notepad++
notepad++
New contributor
New contributor
edited 6 hours ago
Peter Mortensen
8,376166185
8,376166185
New contributor
asked yesterday
loveman2019loveman2019
443
443
New contributor
New contributor
9
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
3
@WELZ Yes but its more work, a half working sample would(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string:1***@2***3
- uses a fixed number of mask characters but this is actually good.
– eckes
yesterday
add a comment |
9
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
3
@WELZ Yes but its more work, a half working sample would(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string:1***@2***3
- uses a fixed number of mask characters but this is actually good.
– eckes
yesterday
9
9
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
3
3
@WELZ Yes but its more work, a half working sample would
(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string: 1***@2***3
- uses a fixed number of mask characters but this is actually good.– eckes
yesterday
@WELZ Yes but its more work, a half working sample would
(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string: 1***@2***3
- uses a fixed number of mask characters but this is actually good.– eckes
yesterday
add a comment |
2 Answers
2
active
oldest
votes
I want to change the two letters before "@" and the first letter after "@"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
..@.
Set "Replace with" to
**@*
Enable "Regular expression"
Click "Replace All"
Before:
username@yourdomain.com
After:
userna**@*ourdomain.com
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be.?.@.
as there might not be two characters before @.
– n0rd
1 hour ago
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
add a comment |
You can do this by using a regex search/replace.
At the bottom, select Regular Expression.
In the Search for entry, you type in: ..@.
In the Replace with, you type in **@*
Then press the button Replace All
This works because Regex searches will only replace if its search criteria matches exactly. The match is explained as follows:
..@.
There are 3 dots and an @
:
@
has no special meaning in regex so it means a literal @..
means any character, exactly once. By writing..
it means 2 characters of any kind, as long as there are 2 characters.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
loveman2019 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1414191%2fhow-do-i-change-two-letters-closest-to-a-string-and-one-letter-immediately-after%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I want to change the two letters before "@" and the first letter after "@"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
..@.
Set "Replace with" to
**@*
Enable "Regular expression"
Click "Replace All"
Before:
username@yourdomain.com
After:
userna**@*ourdomain.com
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be.?.@.
as there might not be two characters before @.
– n0rd
1 hour ago
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
add a comment |
I want to change the two letters before "@" and the first letter after "@"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
..@.
Set "Replace with" to
**@*
Enable "Regular expression"
Click "Replace All"
Before:
username@yourdomain.com
After:
userna**@*ourdomain.com
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be.?.@.
as there might not be two characters before @.
– n0rd
1 hour ago
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
add a comment |
I want to change the two letters before "@" and the first letter after "@"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
..@.
Set "Replace with" to
**@*
Enable "Regular expression"
Click "Replace All"
Before:
username@yourdomain.com
After:
userna**@*ourdomain.com
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
I want to change the two letters before "@" and the first letter after "@"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
..@.
Set "Replace with" to
**@*
Enable "Regular expression"
Click "Replace All"
Before:
username@yourdomain.com
After:
userna**@*ourdomain.com
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
answered yesterday
DavidPostill♦DavidPostill
107k27233267
107k27233267
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be.?.@.
as there might not be two characters before @.
– n0rd
1 hour ago
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
add a comment |
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be.?.@.
as there might not be two characters before @.
– n0rd
1 hour ago
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
DavidPostill thanks,it worked for me.
– loveman2019
yesterday
7
7
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
@loveman2019 Do you need more help? If this answered your question, please don't forget to accept the answer by clicking the accept button (the tick ✓ button).
– DavidPostill♦
yesterday
I'd say it should be
.?.@.
as there might not be two characters before @.– n0rd
1 hour ago
I'd say it should be
.?.@.
as there might not be two characters before @.– n0rd
1 hour ago
1
1
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
@n0rd The question specified two characters, but you are correct if there is only one.
– DavidPostill♦
1 hour ago
add a comment |
You can do this by using a regex search/replace.
At the bottom, select Regular Expression.
In the Search for entry, you type in: ..@.
In the Replace with, you type in **@*
Then press the button Replace All
This works because Regex searches will only replace if its search criteria matches exactly. The match is explained as follows:
..@.
There are 3 dots and an @
:
@
has no special meaning in regex so it means a literal @..
means any character, exactly once. By writing..
it means 2 characters of any kind, as long as there are 2 characters.
add a comment |
You can do this by using a regex search/replace.
At the bottom, select Regular Expression.
In the Search for entry, you type in: ..@.
In the Replace with, you type in **@*
Then press the button Replace All
This works because Regex searches will only replace if its search criteria matches exactly. The match is explained as follows:
..@.
There are 3 dots and an @
:
@
has no special meaning in regex so it means a literal @..
means any character, exactly once. By writing..
it means 2 characters of any kind, as long as there are 2 characters.
add a comment |
You can do this by using a regex search/replace.
At the bottom, select Regular Expression.
In the Search for entry, you type in: ..@.
In the Replace with, you type in **@*
Then press the button Replace All
This works because Regex searches will only replace if its search criteria matches exactly. The match is explained as follows:
..@.
There are 3 dots and an @
:
@
has no special meaning in regex so it means a literal @..
means any character, exactly once. By writing..
it means 2 characters of any kind, as long as there are 2 characters.
You can do this by using a regex search/replace.
At the bottom, select Regular Expression.
In the Search for entry, you type in: ..@.
In the Replace with, you type in **@*
Then press the button Replace All
This works because Regex searches will only replace if its search criteria matches exactly. The match is explained as follows:
..@.
There are 3 dots and an @
:
@
has no special meaning in regex so it means a literal @..
means any character, exactly once. By writing..
it means 2 characters of any kind, as long as there are 2 characters.
edited yesterday
Ismael Miguel
1871215
1871215
answered yesterday
LPChipLPChip
36.3k55487
36.3k55487
add a comment |
add a comment |
loveman2019 is a new contributor. Be nice, and check out our Code of Conduct.
loveman2019 is a new contributor. Be nice, and check out our Code of Conduct.
loveman2019 is a new contributor. Be nice, and check out our Code of Conduct.
loveman2019 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1414191%2fhow-do-i-change-two-letters-closest-to-a-string-and-one-letter-immediately-after%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
9
Just an obvious remark, the concrete example you gave shows how useless this pattern would be to anonymize email addresses. It’s usually better like x******@y***.com
– eckes
yesterday
@eckes would that even be possible in N++?
– WELZ
yesterday
3
@WELZ Yes but its more work, a half working sample would
(.)[^@]*@([^.]).*(.[a-z]+)
use 3 capture groups which you can address in the replace with string:1***@2***3
- uses a fixed number of mask characters but this is actually good.– eckes
yesterday