lua-users home
lua-l archive

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


  As long as this has been broached, my wish for LPEG is a case-insentive
match and it doesn't have to be a generalized solution either.  For my use
case, it would be enough to handle just the letters 'A' through 'Z' and
otherwise ignore the horror show that is Unicode.  Something like:

	lpeg.I("Content-Type") would match 'content-type' or 'CONTENT-TYPE'

	lpeg.C(lpeg.I("Content-Type")) would still match 'content-type' or
	'CONTENT-TYPE' but return "Content-Type" as the match.
 
  The usecase I have in mind is parsing Internet messages (email, HTTP
headers, etc. as can be seen from the example).  That's pretty much it.

  -spc