lua-users home
lua-l archive

LPeg Matching Inverse of Set

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


I'm starting out with LPeg but struggling with inverse matching on a set.
As an example, trying to match a substring without ';' or ',' chars
 patt = (-lpeg.S";,") ^ 1
Fails with "loop body may accept empty string"
Plain -lpeg.S";," does the right thing for the first char, so why
doesn't ^ 1 extend that for longer strings?
Scott

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