text extractor a handy tool written in Perl, for extracting strings from files or redirected output from other programs.

Examples:

  • extract IP from list.txt:
    ./textextract.pl \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} list.txt
  • extract e-Mail addresses from list.txt:
    ./textextract.pl ([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4}) list.txt
  • extract time from dir command:
    dir|./textextract.pl \d+\:\d+ -

Download: textextract.pl