[oclug] A Friday Regex Head Scratcher

yanick at babyl.dyndns.org yanick at babyl.dyndns.org
Tue Apr 21 17:12:38 EDT 2009


On Tue, Apr 21, 2009 at 11:53:31AM -0400, Jon Earle wrote:
> Oh, I see... for every program (ie: .pl file), a single $& affects every
> regex that could potentially be encountered in that program, whereas $1
> affects only the specific regex in which it's used, in which case, Dave's
> suggestion of using $1 optimizes performance of the entire program (or
> rather, prevents performance degradation of the entire program).  Is that
> correct?

	'xactly. :-)

> > 	Excellent.  I was half afraid you'd take a look at the regex, turn
> > green, and immediately proceed to format your hard-drive. :-)
> 
> Well, I admit, on Fri afternoon, I tried to decipher it and closed it in
> fear. :)  A fresh look on Monday made it all come together.


	And in the end it proved to be an educative ride.  So it was all
worth it. :-)

Joy,
`/anick


More information about the OCLUG mailing list