rurban / re-engine-PCRE2

use pcre-jit instead of slow perl regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: -strict

Grinnz opened this issue · comments

It would be nice to provide an option to prevent any fallback to the core regex engine, in case you want to only use PCRE2. See similar option for re::engine::RE2: https://metacpan.org/pod/re::engine::RE2#NOTES

Indeed, thanks. Should be easy to implement.
I'm just not sure about the name. strict looks more like a pcre2 capability, which it doesn't have.

-strict => 1
Be strict, i.e. don't allow regexps that are not supported by this engine. Don't fallback to the CORE regex engine, rather error.

Maybe -no-fallback, -no-core, -only-pcre2 or -pcre2-only are better.

-no-fallback seems pretty descriptive.