[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to translate lua pattern "(.*)and(.*)" with lpeg re ?
- From: albertmcchan <albertmcchan@...>
- Date: Mon, 22 Jan 2018 11:18:41 -0500
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 ...