Re: Patterns: Why are anchors not character classes?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Patterns: Why are anchors not character classes?
- From: Paul K <paul@...>
- Date: 2015年7月14日 16:39:18 +0000
Hi John,
> Take the simple case of parsing a comma-separated list, the kludge I keep coming back to is concatenating a terminating comma onto the source string before applying the pattern:
...
> for n in ps:gmatch("(%d+)[,%$]") do
I ran into this couple of times and found that the frontier pattern
can do this job:
ps:gmatch("(%d+)%f[^%d]")
Paul.