in reply to Drop in regex replacements?

I think I understand what you're trying to do here. While I don't have the brain cycles to process the exact regexp you have there, could it be that the problem you're seeing is just because you're using double quotes (") when you should be using a single quote ('), in the hash definition?
my %taglist_complex = ( 'email' => "<a href='mailto:$1'>$2</a>", 'url' => "<a href='$1'>$2</a>", 'img' => "<img src='$1' alt='$2' />" );
$1 and $2 are getting extrapolated in this definitions, while I think you mean to have them there as literals.

-- Dan

Replies are listed 'Best First'.
Re: Re: Drop in regex replacements?
by IOrdy (Friar) on Sep 09, 2002 at 14:42 UTC
    The problem with double quotes being that they will try and interpolate the $1 right there and then (well thats what I thought it was trying to do). Regardless I did try that and it's not the problem.

    I should also note that the regex's actually do work fine (though they may not be 100% correct as I'm new to the sport) it's just I get a literal '<b>$1</b>' as the replacement.