Reputation: 1
Basically I have a huge text file formatted like this:
496: [email protected]|valrh
576: [email protected]|$te
731: [email protected]|bghu78s
2438: [email protected]|hold
3340: [email protected]|khadija
I want to edit the list so after removal the list looks like this:
[email protected]|valrh
[email protected]|$te
[email protected]|bghu78s
[email protected]|hold
[email protected]|khadija
So basically remove the numbers,the colon, and the space.
Upvotes: 0
Views: 210
Reputation: 1
If you alreay know how to user regular expression search on Notepad++, just use this:
([0-9])\w+:\s
If you whant know more see this: http://www.regexr.com/ and http://markantoniou.blogspot.com.br/2008/06/notepad-how-to-use-regular-expressions.html
Upvotes: 0
Reputation: 125767
Use the Search/Replace dialog.
Use (\d+: )(.*)
as the value for "Find what:".
Use \2
as "Replace with:"
Check the "Regular expression" item at the bottom left in the "Search Mode" box.
Input:
496: [email protected]|valrh
576: [email protected]|$te
731: [email protected]|bghu78s
2438: [email protected]|hold
3340: [email protected]|khadija
Output:
[email protected]|valrh
[email protected]|$te
[email protected]|bghu78s
[email protected]|hold
[email protected]|khadija
Upvotes: 0
Reputation: 2900
Find and replace with "" (i.e., leave the "replace with" field blank):
\d+:[ ]
\d
Matches a digit+
Matches one or more of the previous item, in this case digits:
Matches a colon[ ]
Matches a space - NB You don't need the square brackets; I just wanted the space to be visibleIn the future, you can find a lot of great info on regexes at http://www.regular-expressions.info/
Upvotes: 2