
Ich möchte nur die E-Mail und das Passwort behalten und alle anderen Informationen löschen.
Name: Test1 Test1
Address: 11 Test Road
Country : Test1
Post Code: abc111
EmailPass : [email protected]:password111$£*!
Name: Test2 Test2
Address: 22 Test Road
Country : Test2
Post Code: abc222
EmailPass : [email protected]:password222$£*!
Was ich möchte:
[email protected]:password111$£*!
[email protected]:password222$£*!
Antwort1
Dies stimmt mit der E-Mail übereinnurnachEmailPass :
- Ctrl+H
- Finde was:
.+?EmailPass : (\S+@\S+)
- Ersetzen mit:
$1\n
- DEAKTIVIEREN Groß-/Kleinschreibung beachten
- ÜBERPRÜFEN Umwickeln
- ÜBERPRÜFEN Regulären Ausdruck
- ÜBERPRÜFEN
. matches newline
- Replace all
Erläuterung:
.+? # 1 or more any character, not greedy
EmailPass : # literally
( # group 1
\S+ # 1 or more non space
@ # @
\S+ # 1 or more non space
) # end group
Ersatz:
$1 # content of group 1, the email
\n # a linebreak, you can use \r\n for Windows EOL
Screenshot (vorher):
Screenshot (nachher):
Antwort2
Dies gleicht nur korrekte E-Mails ab (E-Mails, die „ @
und „ und .
„ Text von beiden Seiten und dazwischen enthalten). Es stellt auch sicher, dass nach dem :
ein Passwort angegeben wird.
(?s).*?(\S+@\S+\.\S+:\S+)|.+
Ersetzen mit\1\n
Eingabebeispiel:
Post Code: abc111
EmailPass : [email protected]:password222$£*!
Post Code: abc222
EmailPass : test_222@gmail.:password222$£*!
Post Code: abc111
EmailPass : [email protected]:
Post Code: abc111
EmailPass : [email protected]:password333$£*!
Ergebnis:
[email protected]:password222$£*!
[email protected]:password333$£*!