Some LLM APIs let you give a schema or regex for the answer. I think it works because LLMs give a probability for every possible next token, and you can filter that list by what the schema/regex allows next.
I think they are saying that if highest probability phrase fails the regex, the LLM is able to substitute the next most likely candidate.
e.g. DOMINO https://arxiv.org/html/2403.06988v1