I fail, and I do not know why. It seems my regex is correct, but my matcher results are not what I expect. Maybe I do not understand them. I would expect 3 groups from the matcher pattern, but I get 0.
Can someone help explain where I am going wrong?
Can someone help explain where I am going wrong?
Code:
void main ()
{
string page = "Thus there are numbers of 100 and 85 and 3466 and it was good";
matcher mm = create_matcher("[0-9]+", page);
if (find(mm))
{
for ii from 1 to (group_count(mm))
{
print("Found this: "+group(mm,ii),"blue");
}
}
else
{
print("not found");
}
}