lua-users home
lua-l archive

Re: new string functions (was Re: Standard Libraries....)

[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 2010年1月18日, 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

AltStyle によって変換されたページ (->オリジナル) /