Correct actually. It just didn't dawn on me that $2 was being "reused" but that is unlike perl to do that. I would have thought that it would know that I wanted 2 captures. So is this just a new issue that hasn't come up before? or is it something seen just nothing done about it?
I am using the first example anyway because I need it working now, but I was curious to learn if this is a problem/bug or if this was the intended result. Perldocs didn't have much about this kind of situation, so I don't know what the intended result would be. > -----Original Message----- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 31, 2002 12:21 PM > To: 'Nikola Janceski'; Beginners (E-mail) > Subject: RE: regex capturing > > > But it does capture the second occurrence (the 31). It doesn't capture > the first (the 07). > > In the absence of /g, it would seem that since there are only two > sets of parens in the second regex, only two values can be captured. > The {2} quanitifier would simply cause $2 to be "reused". > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]