Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (14 sloc) 0.609 kB
use Test;
plan 10;
my regex abc { abc }
ok 'foo abc def' ~~ / <&abc> /, '<&abc> does lexical lookup';
is ~$/, 'abc', 'matched the right part of the string';
nok $<abc>, '... and does not capture (2)';
nok $<&abc>, '... and does not capture (3)';
ok 'fooabcdef' ~~ / . <abc=&abc> . /, '<abc=&abc> captures lexical regex';
is ~$/, 'oabcd', 'correctly matched string';
is $<abc>, 'abc', 'correctly captured to $<abc>';
ok 'fooabcdef' ~~ / . <other=&abc> . /, '<other=&abc> captures lexical regex';
is ~$/, 'oabcd', 'correctly matched string';
is $<other>, 'abc', 'correctly captured to $<other>';
done;
Jump to Line
Something went wrong with that request. Please try again.