re-engine-RE2 replaces Perl's regex engine in a given lexical scope with RE2. RE2 uses automata theory to guarantee that regular expression searches run in time linear in the size of the input. Extra functionality of RE2 methods can be called on a compiled regular expression.