develooper Front page | perl.perl5.porters | Postings from November 2012

[perl #115214] re::engine seems to fail supporting \G

Thread Next
Matthew Horsfall via RT
November 24, 2012 11:59
[perl #115214] re::engine seems to fail supporting \G
Message ID:
Is this actually a Perl bug? says:

"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"

If you want to avoid (and detect) that behavior, you can use the -strict
=> 1 pramga.

mhorsfall@Fireforge:~$ perl -E 'use re::engine::RE2 -strict => 1; say
"OK" if "abc\n" =~ /\Gabc$/'
invalid escape sequence: \G at -e line 1.

-- Matthew Horsfall (alh)

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About