Ask a Question related to PERL Beginners, Design and Development.
-
Boris Shor #1
TokeParser and get_trimmed_text question
Hello,
New Perl programmer here. I am using HTML::TokeParser to parse HTML files.
It is really very useful. In particular, I use the get_trimmed_text()
function quite a bit to extract tag-free text from HTML files.
I usually use the function in this fashion:
$x = $p -> get_trimmed_text('/strong');
Which gets text from the current location until the parser finds a </strong>
tag. Which is fine. But sometimes I want to get trimmed text until a certain
TEXT pattern, not until a certain tag. Does something exist like:
$x2 = $p -> get_trimmed_text(/some regular exp/);
Which would give me tag-free text until I get to "some regular expression"?
Thanks!
Boris
Boris Shor Guest
-
Html::tokeparser::simple
Someone want to show me how this module can help parse out html? I want to grap text between <td>text</td> being able to apple regexp to get what... -
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you
<RonGrossi382872@yahoo.com> wrote in message news:1114393703.900419.199790@f14g2000cwb.googlegroups.com... This is the most important question of... -
TokeParser help
Hello, I am a Perl newcomer, and I'm trying to use the TokeParser module to extract text from an HTML file. Here's the Perl code: use... -
HTML::TokeParser . How to ignore tags when 'get_trimmed_text'
Hello. I'm trying to parse an XML file by using HTML::TokeParser : * XML File: <item> <value>This is my <em>house</em></value> <value>This...



Reply With Quote

