How do I remove anything not letters or numbers from part of lines in txt file?
More explaining I have username:password
or username;password
.
I want to edit the username only and remove anything that not letters or numbers from it without touch the password. I would like do it with Regular Expressions since I am using Emeditor For Large Files and I believe Regular Expressions work in both Notepad++
and Emeditor
.
What have I tried?
I did use Find: [^a-z0-9:;]+
but cant skip the password after :
or ;
so what I want to do is to skip line start from :password here
and ;password here
and only remove none letters or numbers from username alone.
Sorry if I didn't describe everything well, admins can edit if possible.
Full Example of lines:
!start._1:stop.~1@
Sta%rs&:B!ge(s+R}\
#Step[14,:St,./\Ert`
~user@#%name^*)+:P@$$wor'";D
T&*est~!@#$%^&*()_+={}|\;pass;word123
user@#%name;password!#$~`'123
45Star^5#$Lord1:@T1esting!
u~s#e%r^n&a*m(e)t_e+s-t,:Pa:ssw/orD$+;
Needed Result:
start1:stop.~1@
Stars:B!ge(s+R}\
Step:St,./\Ert`
username:P@$$wor'";D
Test;pass;word123
username;password!#$~`'123
45Star5Lord1:@T1esting!
usernametest:Pa:ssw/orD$+;