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 and *-office.html) searching for some regular expressions:
for *-home.html:
regexAone: abc(\d+abc)def
regexAtwo: lmn(\d+ooo)ofg
regexAthree: pqr(\d+kh)stu
for *-office.html:
regexBone: artemis(ao\d+dde)lock
regexBtwo: pretamus(\d+zz)balim
It must output each regular expression match result (important: only the par
t of it within the parenthesis, not the entire match) to a txt file with the
same name as the input html file plus a suffix corresponding to the name of
the processed regular expression like above defined, producing an output sc
enery like this:
c:\output\pumico-home-regexAone.txt
c:\output\pumico-home-regexAtwo.txt
c:\output\pumico-home-regexAthree.txt
c:\output\ofofo-home-regexAone.txt
c:\output\ofofo-home-regexAtwo.txt
c:\output\ofofo-home-regexAthree.txt
c:\output\cimaba-office-regexBone.txt
c:\output\cimaba-office-regexBtwo.txt
c:\output\plata-home-regexAone.txt
c:\output\plata-home-regexAtwo.txt
c:\output\plata-home-regexAthree.txt
c:\output\plata-office-regexBone.txt
c:\output\plata-office-regexBtwo.txt
c:\output\zito-home-regexAone.txt
c:\output\zito-home-regexAtwo.txt
c:\output\zito-home-regexAthree.txt
__________________
For example, supposing that the c:\input\cimaba-office.html file contains th
e following 5 lines:
dfgdfsgdf
setertert
artemisao123456ddelock
garumbzeta
pretamus9999zzbalim
popolissss
c:\output\cimaba-office-regexBone.txt will be generated containing:
ao123456dde
c:\output\cimaba-office-regexBtwo.txt will be generated containing:
9999zz
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 and *-office.html) searching for some regular expressions:
for *-home.html:
regexAone: abc(\d+abc)def
regexAtwo: lmn(\d+ooo)ofg
regexAthree: pqr(\d+kh)stu
for *-office.html:
regexBone: artemis(ao\d+dde)lock
regexBtwo: pretamus(\d+zz)balim
It must output each regular expression match result (important: only the par
t of it within the parenthesis, not the entire match) to a txt file with the
same name as the input html file plus a suffix corresponding to the name of
the processed regular expression like above defined, producing an output sc
enery like this:
c:\output\pumico-home-regexAone.txt
c:\output\pumico-home-regexAtwo.txt
c:\output\pumico-home-regexAthree.txt
c:\output\ofofo-home-regexAone.txt
c:\output\ofofo-home-regexAtwo.txt
c:\output\ofofo-home-regexAthree.txt
c:\output\cimaba-office-regexBone.txt
c:\output\cimaba-office-regexBtwo.txt
c:\output\plata-home-regexAone.txt
c:\output\plata-home-regexAtwo.txt
c:\output\plata-home-regexAthree.txt
c:\output\plata-office-regexBone.txt
c:\output\plata-office-regexBtwo.txt
c:\output\zito-home-regexAone.txt
c:\output\zito-home-regexAtwo.txt
c:\output\zito-home-regexAthree.txt
__________________
For example, supposing that the c:\input\cimaba-office.html file contains th
e following 5 lines:
dfgdfsgdf
setertert
artemisao123456ddelock
garumbzeta
pretamus9999zzbalim
popolissss
c:\output\cimaba-office-regexBone.txt will be generated containing:
ao123456dde
c:\output\cimaba-office-regexBtwo.txt will be generated containing:
9999zz