[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: help about pattern-matching
- From: Tony Finch <dot@...>
- Date: Wed, 1 Jun 2011 20:11:41 +0100
Igor Medeiros <igorosbergster@gmail.com> wrote:
>
> How to represent the pattern ([a-z]|[A-Z]|_)+([a-z]|[A-Z]|[0-9]_)* in Lua's
> format pattern.
You can't put quantifiers *+ after captures () and there is no | operator.
But in this case you can write "[A-Za-z_]+[0-9A-Za-z_]*" or "[%a_]+[%w_]*".
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Rockall, Malin, Hebrides: South 5 to 7, occasionally gale 8 at first in
Rockall and Malin, veering west or northwest 4 or 5, then backing southwest 5
or 6 later. Rough or very rough. Occasional rain. Moderate or good,
occasionally poor.