> -----Original Message----- > From: Girish [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 20, 2001 3:42 AM > To: [EMAIL PROTECTED] > Subject: Regex: Why [^>]* and not .*? > > > Hi Again, > > I have a doubt, why do people use > > if($html =~ /(<[^>]*>)/) { > .... > } > > > instead of simple to use and understand > if($html =~ /(<.*?>)/) { > .... > } > To extract HTML tags.
I think the non-greedy qualifiers were added to Perl relatively recently (but before 5.6 I think). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]