Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 studying the Monastery: (13)
As of 2015-07-02 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls