in reply to Backreferences
-- 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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Backreferences
by Thelonius (Priest) on Jul 23, 2003 at 15:38 UTC |