A simple m{<REF HREF=(.*?)\s*/>} might work here. At least it will work in the case of the "typical line" that you showed.
Of course the real clean way to do is to use a proper HTML parser, like HTML::Parser, HTML::TokeParser::Simple or HTML::TreeBuilder. HTML::TreeBuilder offers the extract_links method which will probably be just what you are looking for. It will deal with case problems, absent (or alternate) quotes... and be generally a lot more robust than what you seem to be doing here. Have a look at Sean M Burke's book Perl & LWP for more info on processing HTML with Perl.
.In reply to Re: Matching optionally quoted string
by mirod
in thread Matching optionally quoted string
by JoshuaD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |