Re: lpeg.U ?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lpeg.U ?
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2018年1月26日 09:14:39 +0200
2018年01月26日 0:19 GMT+02:00 albertmcchan <albertmcchan@yahoo.com>:
> Is there a lpeg.U(n) (for undo n characters) or something similar ?
You have two options.
#p matches what p matches, but consumes no input.
A Cg/Cb allows you to store a capture and use it later.
Actually, all the answers I could give to questions like yours are in my
lpeg-brief article on https://github.com/dlaurie/lua-notes.