lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jan 20, 2010 at 01:37:46AM +0000, Tony Finch wrote:
> On Mon, 18 Jan 2010, David Manura wrote:
> > On Mon, Jan 18, 2010 at 12:41 AM, Vaughan McAlley wrote:
> > > 2010/1/18 Majic:
> > >> WHAT IS THIS G?!
> > > Global, I think (not to be confused with global variables :-) )
> >
> > I've asked that too.  Maybe it's something to add to the manual.
> > To quote the Lhf, "The name gsub was taken from AWK, way back in Lua
> > 2.5." You also see a variant of it (/g) make its way into Perl.
> 
> The g in "grep" has the same etymology.
<ot>
the name "grep" resembles the vi command
:g/re/p
meaning globally if regular expression re matches then print
</ot>

cheers