From: Iain Barnett Date: 2010-07-27T09:55:15+09:00 Subject: Re: Regex ^ beginning not strong? --Apple-Mail-1--910286489 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 26 Jul 2010, at 21:40, Robert Klemme wrote: >=20 > I think you found a bug - probably related to referring to back = references to named capturing groups: >=20 >=20 >=20 > Frankly, I never used named capturing groups yet (simply for habit and = compatibility). It was probably a good choice so far. >=20 > Kind regards >=20 > robert >=20 Thanks for checking that. While searching for more information on the = Oniguruma engine I noticed that there was a CPAN library for running it = under Perl, so I installed it and ran the same regexes against the perl = engine, and it had the same results as Ruby. This indicates that it's a = problem with the engine and not something Ruby is doing along the way, = so I'll file a report with the Oniguruma team and include all your tests = too and see what happens. With Oniguruma: $ perl -Mre::engine::Oniguruma -e ' if ( q(/\d\d\\d/) =3D~ /^(?.)(?.+?)\g{delim}/ ) { while ( my ($key, $value) =3D each(%+) ) { print "$key =3D> $value\n"; } } ' Usual Perl engine: $ perl -e ' if ( q(/\d\d\\d/) =3D~ /^(?.)(?.+?)\g{delim}/ ) { while ( my ($key, $value) =3D each(%+) ) { print "$key =3D> $value\n"; } } ' pat =3D> \d\d\d delim =3D> / Regards, Iain= --Apple-Mail-1--910286489--