Rather than carry them around spearately, the options for how to execute a regex are kept as part of the regex. There are two types of options. Those that can only be specified at compilation time and never changed are CompOpt. Those that can be changed later and affect how matching is performed are ExecOpt. The actually types for these depend on the backend.