[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Getting the text from a HTMLfile. / match problem ?



Hi, 
I need to get the text from a HTML file and I wonder if I should use the
HTML Parser
for this or if I should process it just by reading the text with a lot
of comments <!--kkkkkkk -->.
Which is the best way to go ?
(BTW. I'm working with MacPerl)


I need to get the text from the following
<html>
<body>
Some html
some html some more htmlcode.
Then find the following comment:
<!--VALUE: PARTS="4" PART1="3" PART2="0" PART3="2" PART4="1" -->
Get the values, read it into scalars 
$PARTS = '4';
$PART1 = '3';
$PART2 = '0';
$PART3 = '2';
$PART4 = '1';

then get the the rest of the comments 
which looks like this <!--VALUE: NAME="some_name" -->
TEXT TEXT TEXT<br>
TEXT <b>TEXT</b> TEXT<br>
<!--END -->

read it into scalars like this:
$some_name = 'TEXT TEXT TEXT<br>
TEXT <b>TEXT</b> TEXT<br>';



Some html
some html some more htmlcode.
</body>
</html>

I'm not good at matching expressions, is there a good tutorial 
somewhere or could someone give me some pointers on how to proceed on this?
I 'm very gratefull for any help.
Yours sincerely
Jimmy Lantz

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org