in reply to Re: capture psudo tags
in thread capture psudo tags
would work. Additionally, there's no need for the first match, so it could just be$text =~ s!(.*?)<link=(".*?")>(.*?)</link>!$1<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.$text =~ s!<link=(".*?")>(.*?)</link>!<a ref=$2>$3</a>!gi;
|
|---|