in reply to Re: capture psudo tags
in thread capture psudo tags

Or you could use something other than / for your delimiters, if you're going to have a lot of slashes in your patterns. For instance,
$text =~ s!(.*?)<link=(".*?")>(.*?)</link>!$1<a ref=$2>$3</a>!gi;
would work. Additionally, there's no need for the first match, so it could just be
$text =~ s!<link=(".*?")>(.*?)</link>!<a ref=$2>$3</a>!gi;
As for the ?, it is meaningful. *? is a non-greedy match. But in general, I agree with the others that the whole attempt could be an interesting playpen for learning, but really shouldn't be attempted seriously.