regex is used as a regex, with the mode
mode (if known).
If regex mode is not known,
mode will be
As an optimisation, only regexes containing an infinite repitition quatifier (
and therefore may be relevant for ReDoS queries are considered.