Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

419.Text file parser -- How to extract all IP address from a text file?

User: editor -- 2010-02-12
Hits: 236
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all IP address from a text file?
Input Sample:
172.1.1.2 testing 173.2.2.3 ok
122.3.3.8 152.2.2.2
Output Sample:
172.1.1.2
173.2.2.3
122.3.3.8
152.2.2.2
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 dialog
in 'search for pattern', enter:

in 'Replace with pattern', enter:

Uncheck 'Print Unmatched Unit' option
3. click 'replace', done.
4. ctrl-s save to file.
Download Script:  scripts/419.rst.zip

Similar Examples:
How to extract all email addresses from many text files? (83%)
How to extract/parse all http addresses from text/html file? (77%)
How to extract all telephone numbers from a text file? (74%)
Can I translate all the IP address to country in a text file?
(74%)
How to extract/parse all upper cases Acronyms from a text file? (71%)
How to extract all image links from a html file? (69%)
How to shuffle all the lines in a text file? (69%)
How to reverse all cases of letters in a text file? (67%)

Check Demo of Text file parser