Hello: Now, there are three kind of URL that I want to extract: 1.<td valign="top" nowrap="nowrap" align="left"><a target="_self" href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">2</a></td> 2.<td valign="top" nowrap="nowrap" align="left"><a target="_self" href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">2abcd</a></td> 2.<td valign="top" nowrap="nowrap" align="left"><a target="_self" href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">3</a></td> I just want to extract the first URL which fits my condition, so I use: if($line=~m/href="((?:[^"\\]|\\.)*)">2/) But use this method the second also fit it. How can I extact the first URL from the three ind of lines? Thank you very much! Franklin
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>