From: "Uri Guttman" <u...@stemsystems.com>
"AM" == Alexey Mishustin <shumkarshumkar.ru> writes:

 AM> I used brackets not for storing but for combining in order to use the
 AM> combined patterns in alternation.

the point is parens (the correct term. brackets are []) is they will
grab the match inside them and store it in $1 and friends. grouping
without grabbing is more efficient and also tells the reader (that
person again! :) that they shouldn't look for using $1 (or whatver
number) after this regex is used.

 AM> Oops. Evidently, I was wrong in this combining... I meant

 AM> (imgres)

 AM> OR

 AM> (images)

 AM> OR

 AM> (products)

nope. you mean (:?imgres|images|products).

uri


The correct syntax is (?:imgres|images|products).

The wrong syntax appeared in 2 messages and it might cause confusion.

Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to