Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Replace after match in regex (key value subsitution)

by JavaFan (Canon)
on Oct 23, 2008 at 09:53 UTC ( #718995=note: print w/replies, xml ) Need Help??


in reply to Replace after match in regex (key value subsitution)

I'd write that as (untested):
$$text_ref =~ s{"http://\K([^/"]*)(?=["/]){$main::fixers{$1} // $1}eg;
I assume non of the values of %main::fixers is undefined.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2023-02-02 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (19 votes). Check out past polls.

    Notices?