lua-users home
lua-l archive

Re: Patterns: Why are anchors not character classes?

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


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.

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