NAME

SYNOPSIS

DESCRIPTION

This module replaces perl's regex engine in a given lexical scope with RE2.

RE2 is a primarily DFA based regexp engine from Google that is very fast at matching large amounts of text. However it does not support look behind and some other Perl regular expression features. See RE2's website for more information.

Fallback to normal Perl regexp is implemented by this module. If RE2 is unable to compile a regexp it will use Perl instead, therefore features not implemented by RE2 don't suddenly stop working, they will just use Perl's regexp implementation.

METHODS

To access extra functionality of RE2 methods can be called on a compiled regular expression (i.e. a qr//).

possible_match_range([length = 10])

Returns an array of two strings: where the expression will start matching and just after where it will finish matching. See RE2's documentation on PossibleMatchRange for further details.