I have file full of email and mailing addresses that has a lot of junk in the file that I need to remove. Is there anyway to remove all non-alpha, non-digit characters, but have some list of characters that are acceptable? For example, I don't want to remove '@' or '.' or '-' and I'm sure there are other characters that I can think of.
I guess I'm asking if I can find and replace all "junk" characters with some exceptions.
Thanks
remove all junk characters from a file
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Does this do roughly what you want?
Look in TextPad's help under
Reference Information | Regular Expressions.
(The hyphen must be the last character (or the first character, after the negating ^) in the [^...] negated character class.)Find what: [^a-z0-9@._-]+
Replace with: [a space]
[X] Regular expression
Replace All
Look in TextPad's help under
Reference Information | Regular Expressions.
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm