Full syntax:
re!(re_str
[, engine
[(force|error on|warn on) runtime (compile|parse)]*
[, engine_flags]
]
) -> CompiledRe
re!()'s contract: Accept static and non-static strings, any engine implementing either ReAstCompiler or ReStrCompiler, with compiletime guarantees degrading depending on inputs:
- static re_str, build-in engine -> compiletime syntax check, compiletime compiled
- static re_str, user supplied compilation engine -> compiletime syntax check, compiletime parsed, runtime compilation
- static re_str, user supplied parsing engine or non-static re_str, build-in engine or non-static re_str, user supplied compilation engine or non-static re_str, user supplied parsing engine -> runtime parsed re, runtime compilation
parse failure: Could just use conditions (because it's generally unexpected unless enduser provided, and then you might probably want an custom validator anyway.)