-- you're grabbing the first matched quote character in the parentheses because, as noted above, you can't use the backreference the way you wanted. Once you have the opening quote, though, you can use it as shown in this regex to terminate your match.$line =~ /\shref=(["'])?([^\s\>]+)\1/;
(edited for clarity)
In reply to Re: Backreferences
by snax
in thread Backreferences
by OCTweak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |