lua-users home
lua-l archive

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


It was thus said that the Great Charles Heywood once stated:
> Wouldn't this be a lookahead for three characters and a "$", and if so,
> match three characters? That should work perfectly fine in LPeg.

  Reread the pattern:

	%?.-([^$][^$][^$])%$

  So,

	?123$		- matches, should return 123
	?987654321$	- matches, should return 321
	?12$		- no match, should return nil
	?12$$		- no match, shoudl return nil

which means the LPeg pattern I gave is slightly incorrect.  I'll fix it in
another message.

  -spc