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

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

Thread Next
From:
Matthew Horsfall via RT
Date:
November 24, 2012 11:59
Subject:
[perl #115214] re::engine seems to fail supporting \G
Message ID:
rt-3.6.HEAD-17500-1353787174-620.115214-15-0@perl.org
Is this actually a Perl bug?

https://metacpan.org/module/re::engine::RE2 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
https://rt.perl.org:443/rt3/Ticket/Display.html?id=115214

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About