in reply to Replace after match in regex (key value subsitution)
The overall script runtime dropped in half (0m4.8s vs. 0m7.2s on a test directory).# pre build a pattern "foo\.edu|fum\.edu" my $what = join('|', map(quotemeta, keys %main::fixers)) ; sub tweak_links($) { my $text_ref = shift; return($$text_ref =~ s!(?<="http://)($what)(?=["/])!$main::fixers{$1}!ge); }
|
|---|