On 12/15/2012 1:12 AM, Andre Caldas wrote:
Hi!
I have to use pattern matching in lua. I tried the function "string.gmatch".
I want to match (iterate over) strings of the type
([0-9]+)(-([0-9]*))?(,|$)
For example:
1,3- (iterations: 1 and 3-)
1-3,6,7 (iterations: 1-3 then 6 then 7)
1-2,5-6,10-
Hello, Hans!
I had just managed to do it. I will switch to yours instead of mine...
I don't have any experience in Lua. Sorry for bothering with such easy
requests...
By the way, simplesteps recognizes number ranges! :-)
https://bitbucket.org/andrecaldas/context-simplesteps/src/1c7ced45208b782895
On 12/15/2012 2:10 AM, Andre Caldas wrote:
Hello, Hans!
I had just managed to do it. I will switch to yours instead of mine...
I don't have any experience in Lua. Sorry for bothering with such easy
requests...
As ranges are sometimes handy I've added a parser to the core (no upload
yet, will
Hi!
> As ranges are sometimes handy I've added a parser to the core
Nice. I will use it as soon as it is available.
It is a very good thing that range specifications will be uniform
across different modules.
André Caldas.
_