Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

439.Text file parser -- How to extract all telephone numbers from a text file?

User: editor -- 2010-03-06          << 438  440 >>
Hits: 3872
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all telephone numbers from a text file? 
 
The typical telephone number is a string that with more than 8 chars of 0-9, +, -, (, )
Input Sample:
test number1 +12-3456789-342 
test number2 12345 
test number3 (23)3266051 
test 58802222
Output Sample:
+12-3456789-342 
(23)3266051 
58802222 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'replace' window 
* in 'search for pattern', enter: 
 
* in 'replace with pattern', enter: 
 
* uncheck 'Print Unmatched unit' option 
3. click 'Replace', all telephone numbers are extracted 
4. ctrl-s save to file
Download Script:  scripts/439.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all lines with numbers from many text files? (84%)
How to extract all lines longer than 80 characters from a text file? (73%)
How to extract all html address from a text file? (72%)
How to extract all IP address from a text file? (72%)
How to extract all upper cases words from a text file? (70%)
How to extract all email addresses from many text files? (70%)
How to extract/parse all upper cases Acronyms from a text file? (68%)
How to extract all image links from a html file? (68%)

Check Demo of Text file parser
Keywords:
phone numbers  phone number  telephone  phone  tel  more than  extracte  ical  unmatched  string  extract telephone number from text file  extract telephone from text file  telephone from text  extract all chars from text file  extract string from text file  extract numbers from a text file  extract string in text file  extract string