regex example fails
Brought to you by:
fagiano
from the docu:
local ex = regexp(@"(\d+) ([a-zA-Z]+)(\p)");
local string = "stuff 123 Test;";
local res = ex.capture(string);
foreach(i,val in res)
{
print(format("match number[%02d] %s\n",
i,string.slice(val.begin,val.end))); //prints "Test"
}
...
will print
match number[00] 123 Test;
match number[01] 123
match number[02] Test
match number[03] ;
but in my test it outputs:
match number[00] 123 Test;
match number[01] 123
match number[02] Test
match number[03]
so the last output does not match.