Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: regex question

by Ovid (Cardinal)
on Jul 10, 2007 at 10:31 UTC ( #625792=note: print w/ replies, xml ) Need Help??


in reply to regex question

You'll need to customize it, but ...

use strict; use HTML::TokeParser::Simple 3.15; my $p = HTML::TokeParser::Simple->new( url => $in{$url} ); while ( my $token = $p->get_token ) { if ( $token->is_start_tag('a') ) { my $href = $token->get_attr('href'); $token->set_attr('href', "foo$href"); } print $token->as_is; }

Cheers,
Ovid

New address of my CGI Course.


Comment on Re: regex question
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://625792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2014-09-15 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (146 votes), past polls