Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 pondering the Monastery: (16)
As of 2015-07-29 15:10 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 (263 votes), past polls