[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Patterns: Why are anchors not character classes?
- From: Paul K <paul@...>
- Date: Tue, 14 Jul 2015 16:39:18 +0000
> 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: