sbool positionalTokenIndex2_matchAll_debug; // use "*" as wildcard static L positionalTokenIndex2_matchAll(S pat, PositionalTokenIndex2 idx) { LS tokPat = wordTok_plusAsterisk(pat); // get raw list from index LLS list = positionalTokenIndex2_filter(idx, tokPat); if (positionalTokenIndex2_matchAll_debug) print("positionalTokenIndex2_matchAll " + pat + " => " + list); new L out; if (list == null) ret out; int n = l(tokPat), nAsterisks = countAsteriskTokens(tokPat); new Matches m; m.m = new S[nAsterisks]; search: for (LS tok : list) { int iVars = 0; for (int i = 1; i < n; i += 2) { S t = tokPat.get(i); if (t.equals("*")) m.m[iVars++] = tok.get(i); else if (!eqic(t, tok.get(i))) continue search; } out.add(m); m = new Matches; m.m = new S[nAsterisks]; } ret out; }