| User: editor -- 2009-12-28 |
| Hits: 133 |
| Type: Regular expression replace |
| Search all Regular expression replace examples |
| Description: |
| How to filter out valid email addresses among thousands of Email addresses? All these email addresses are in a text file and separated by one or more blank spaces. I want to filter out all email address that comply with the required syntax, such as contain one @ character, end with a valid extension, and so on. |
| Input Sample: |
| test1@abc.com test2@gmail.com test3@abc test4 test5@bbb.org |
| Output Sample: |
| test1@abc.com test2@gmail.com test5@bbb.org |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open "Replace" dialogue: * Set "Replace Unit" to "Word" * Uncheck "Print Unmatched Unit" option * Set "Search for Pattern" to: * Set "Replace with Pattern" to: 3. Click "Replace", all valid email addresses that separated by a line break will be listed . 4. ctrl-s to save your result to file. |
| Download Script: scripts/377.rst.zip |
Similar Examples: |
| How to extract all email addresses from many text files? (61%) How to count how many http address and email address appearing in a html file? (52%) How to count how many IP addresses are appearing in a text file? (49%) How to extract all IP address from a text file? (48%) Is it possible to extract all email addresses from web pages like forum? (48%) How to find out all files that contain all words of A, B and C? (47%) How to change all the webpage address into links inside a html file? (46%) How to find out all files that contain both A and B and copy to a new folder? (45%) |
Check Demo of Regular expression replace |