Hello, @ty-ty,
Seemingly, Ty-Ty, you’re asking for three different points :
A : How to delete some structured data, located at each beginning of line ?
B : How to delete some structured data, located at each end of line ?
C : How to add a string at each end of line ?
Just note that the points B and C may be replaced with :
D : How to
replace some
structured data, at each
end of line, by a
literal string
So, let’s imagine your initial list, opened in Notepad++ :
*363780 willtall@gmail.com:xenogears
*363781 kaansoulp@gmail.com:kaan1976
*363782 angelica.valila@gmail.com:pissis69
*363782 angelica.valila@gmail.com:pissis69
*363784 twsnyderman@yahoo.com:sdchbltmvp
*363785 shaunamiekley@gmail.com:lfhs929
*363786 kynajo@gmail.com:jehovah1
*363787 stynrynn@gmail.com:satya96
*363788 haleyottley@gmail.com:haley0ttley
*363789 pandemonium.jones@gmail.com:odder7471
*363790 marielle_koudijs@hotmail.com:Larissa18
*363791 robnoice@gmail.com:robtb303
*363792 willtall@gmail.com:xenogears
*363793 kaansoulp@gmail.com:kaan1976
*363794 angelica.valila@gmail.com:pissis69
*363795 megsellig@gmail.com:bhyc9999
*363796 twsnyderman@yahoo.com:sdchbltmvp
*363797 shaunamiekley@gmail.com:lfhs929
*363798 kynajo@gmail.com:jehovah1
*363799 stynrynn@gmail.com:satya96
Obviously, we can deduce that :
The part to delete, at the beginning, of each line ( Case A ) :
Begin by possible space characters, followed by a * symbol
Then followed by some digits ( 6 in our example ) and ends with possible space characters
The part to delete, at the end, of eech line ( Case B ) :
Begin with the unique
colon of each line, followed by
all the
remaining characters of each line
So, to achieve point A :
Open the Replace dialog ( Ctrl + H )
Type in the regex ^\x20*\*\d+\x20*, in the Find what: zone
Leave the Replace with: zone EMPTY
Check the Wrap around and Regular expression options
Click on the Replace All button
Notes :
The ^ symbol means the beginning of line location
Then, the syntax \x20* represents a string, possibly empty, of space characters
The form \* try to match a literal star character. It must be escaped, due to its special meaning in regexes
And \d+ stands for a non-empty range of consecutive digits
Again, \x20* matches a string, possibly empty, of space characters, before each e-mail address
To achieve point B :
Open the Replace dialog ( Ctrl + H )
Type in the regex :.+, in the Find what: zone
Leave the Replace with: zone EMPTY
Check the Wrap around and Regular expression options
Click on the Replace All button
Notes :
First, the : matches a literal colon symbol
Then the syntax .+ represents any non-empty range of characters, located after the colon, till the end of each line
But, you may combine all these search-replacements, in an unique regex
Therefore, to achieve points A and D, at the same time, use the regexes, below :
SEARCH ^\x20*\*\d+\x20*|(:.+)
REPLACE ?1\x20\x20\x20\x20\x20\x20Love
Notes :
The search regex is just an alternative between the two regexes, discussed above
The second regex (:.+) is surrounded by round parentheses, to be stored as group 1
In replacement, the form ?1....... means :
If group 1 exists, just replace the colon and all text, located after, by six space characters, followed by Love
If group 1 does not exist, delete all text, before each e-mail address, as the ELSE part of this conditional replacement is absent !
So, after a click on the Replace All button, you should get the text below :
willtall@gmail.com Love
kaansoulp@gmail.com Love
angelica.valila@gmail.com Love
angelica.valila@gmail.com Love
twsnyderman@yahoo.com Love
shaunamiekley@gmail.com Love
kynajo@gmail.com Love
stynrynn@gmail.com Love
haleyottley@gmail.com Love
pandemonium.jones@gmail.com Love
marielle_koudijs@hotmail.com Love
robnoice@gmail.com Love
willtall@gmail.com Love
kaansoulp@gmail.com Love
angelica.valila@gmail.com Love
megsellig@gmail.com Love
twsnyderman@yahoo.com Love
shaunamiekley@gmail.com Love
kynajo@gmail.com Love
stynrynn@gmail.com Love
Remark : In the regexes, you may type a single space character, instead of the \x20 syntax ! But, that later form just suppresses any ambiguity !
Best Regards,
guy038