int max_expand(int soff, int poff, int ep) {
			int i = 0;
			while (soff + i < s.length() && singlematch(s.luaByte(soff + i), poff, ep))
				i++;
			while (i >= 0) {
				int res = match(soff + i, ep + 1);
				if (res != -1)
					return res;
				i--;
			}
			return -1;
		}