lua-users home
lua-l archive

Re: how to translate lua pattern "(.*)and(.*)" with lpeg re ?

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


during testing, lpeg backtracking can only handle max string length of 199:
is this a lpeg bug ? only 199 chars limit ?
pat = re.compile "{g <- .g / &'and'} 'and' {.*}"
str = 'and*'
= pat:match( str:rep(3) )
and*and* *
= pat:match( str:rep(50) )
backtrack stack overflow (current limit is 400)
stack traceback ...

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