Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: mailint1
  • Order by date
  1. mailint1

    show only numbers before, within or after the text

    I have a long text file like this: 324yellow 34house black 54532 15m21red56 44dfdsf8sfd23 How can I obtain (Perl - Windows/commandline/singleline) the following? 1) only the numbers at the beginning before some alpha text, like this: 324 34 15 44 2) only the numbers within the alpha text...
  2. mailint1

    Convert some files from html to plaintext

    Yes I mean the text without the HTML code, like that you see with a text-mode browser (e.g. Lynx or W3M)
  3. mailint1

    launch a DOS program from a Perl script?

    The solution was: perl -e "system qq'HTML2TXT $_ > '.(/(.*)html/)[0].'txt' for <c:/dir/*-red.html>
  4. mailint1

    To extract numbers from files with Perl

    quasi-solution: {local @ARGV=<c:/input/*-home.html>; local $^I='.extract.txt'; local $\=$/; while( <> ){ print join'|',/([\d.]+)/g if /\d/ } } This is still not the solution because it puts the new file in pumico-home.html and the old file in pumico-home.html.extract.txt
  5. mailint1

    Convert some files from html to plaintext

    I have many html files named like these: c:\dir\femo-black.html c:\dir\loren-white.html c:\dir\spark-white.html c:\dir\kim-black.html c:\dir\paul-white.html How can I convert only the files named "c:\dir\*-white.html" to plaintext files named c:\dir\(original filename)-text.txt? BTW do you...
  6. mailint1

    To extract numbers from files with Perl

    corrected: I have thousands of files named like these: c:\input\pumico-home.html c:\input\ofofo-home.html c:\input\cimaba-office.html c:\input\plata-home.html c:\input\plata-office.html c:\input\zito-home.html I need a Perl script that only for the files of those that match...
  7. mailint1

    To extract numbers from files with Perl

    I have thousands of files named like these: c:\input\pumico-home.html c:\input\ofofo-home.html c:\input\cimaba-office.html c:\input\plata-home.html c:\input\plata-office.html c:\input\zito-home.html I need a Perl script that only for the files of those that match "c:\input\*-home.html"...
  8. mailint1

    launch a DOS program from a Perl script?

    This seems to be the solution: system "HTML2TXT $_ > ".(/(.*)html/)[0]."txt" for <c:/dir/*-red.html>; but how can I launch it from command-line? I tried PERL 'system "HTML2TXT $_ > ".(/(.*)html/)[0]."txt" for <c:/dir/*-red.html>;' without success... sorry for my incompetence..
  9. mailint1

    launch a DOS program from a Perl script?

    Can I launch a DOS program from within a Perl script? ____ This is what I need to do: I have many files like this: c:\dir\pippo-red.html c:\dir\paperino-yellow.html c:\dir\pluto-red.html c:\dir\gastone-green.html I have a HTML2TXT.EXE program that converts files from html to txt...
  10. mailint1

    Calculate the number of days between two dates

    Interesting! thanks!
  11. mailint1

    regex and file handling

    I already have two quasi-solutions but both miss to use two different direct ories for input and output files: quasi-solution 1: my $f; my %f; while( <DATA> ){ if( /^\s*for\s*(.*):\s*$/ ){ $f=$1; }elsif( /^\s*regex(\w+):\s*(.*)/ ){ $f{$f}{$1}=qr/$2/; }elsif( /\S/ ){ warn...
  12. mailint1

    regex and file handling

    I have thousands of files named like these: c:\input\pumico-home.html c:\input\ofofo-home.html c:\input\cimaba-office.html c:\input\plata-home.html c:\input\plata-office.html c:\input\zito-home.html I need a Perl script that pass through both the categories of these files (* -home.html...
  13. mailint1

    Calculate the number of days between two dates

    Given two dates like the following Feb-14-07 18:20:11 Mar-03-07 20:32:19 how can I calculate the number of days (with decimals!) between the first and the second?

Part and Inventory Search

Back
Top