TokeParser and get_trimmed_text question

From: Boris Shor (bshor_at_Princeton.EDU)
Date: 01/30/04


To: <beginners@perl.org>
Date: Thu, 29 Jan 2004 22:04:37 -0500

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



Relevant Pages

  • Re: using images
    ... The original link would not load for me in Mozilla because of the missing space. ... There isn't any other option to change the way that Publisher generates the html code. ... a placeholder tag is created. ... you do produce your html files, File> Publish to the Web to produce ...
    (microsoft.public.publisher.webdesign)
  • Re: using images
    ... Since the images are local to your PC (and ... If you are using Publisher 2003, then you might try going to Tools> Options ... you do produce your html files, File> Publish to the Web to produce ... It seems that this tag is not worknig with sites like awardspace.com. ...
    (microsoft.public.publisher.webdesign)
  • Re: using images
    ... subfolder under Tools> options> web folder. ... to change the way that Publisher generates the html code. ... a placeholder tag is created. ... you do produce your html files, File> Publish to the Web to produce ...
    (microsoft.public.publisher.webdesign)
  • Re: using images
    ... "DavidF" wrote: ... Go to tools> options> web tab and if you have the Encoding set for Western ... a placeholder tag is created. ... you do produce your html files, File> Publish to the Web to produce ...
    (microsoft.public.publisher.webdesign)
  • Re: using images
    ... Go to tools> options> web tab and if you have the Encoding set for Western ... a placeholder tag is created. ... If you are using Publisher 2003, then you might try going to Tools> ... you do produce your html files, File> Publish to the Web to produce ...
    (microsoft.public.publisher.webdesign)