Re: How to extract the exact URL

2004-09-15 Thread Ing. Branislav Gerzo
Chris Devers [CD], on Wednesday, September 15, 2004 at 07:31 (-0400 (EDT)) wrote: >> if ( $line =~ /href="([^")">2 Typo? That bracket is unbalanced. Try this: CD> if ( $line =~ /href="([^"]+)">22http://learn.perl.org/>

Re: How to extract the exact URL

2004-09-15 Thread Chris Devers
On Wed, 15 Sep 2004, Ing. Branislav Gerzo wrote: > but why is yout regexp so difficult ? what about this ? > > if ( $line =~ /href="([^")">222 but not anything like bar That isn't what you mwant, is it? If you're trying to extract the url, you shouldn't have to put it in an if statement

Re: How to extract the exact URL

2004-09-15 Thread Ing. Branislav Gerzo
Franklin Zhang [FZ], on Wednesday, September 15, 2004 at 11:20 (+0800) wrote these comments: FZ> Now, there are three kind of URL that I want to extract: FZ> 1. href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">2 FZ> 2. href="/Archives/1190192/000101968704002050/0001019

Re: How to extract the exact URL

2004-09-15 Thread Gunnar Hjalmarsson
Franklin Zhang wrote: Now, there are three kind of URL that I want to extract: 1. href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">2 2. href="/Archives/1190192/000101968704002050/0001019687-04-002050-index.htm">2abcd 2. href="/Archives/1190192/000101968704002050/0001019687

How to extract the exact URL

2004-09-14 Thread Franklin Zhang
Hello: Now, there are three kind of URL that I want to extract: 1.2 2.2abcd 2.3 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 line